Ошибка Forbidden 403 при попытке получить токен из "https://android.clients.google.com" - PullRequest
0 голосов
/ 04 ноября 2019

Когда я пытаюсь получить токен от 'https://android.clients.google.com' с правильным именем пользователя и паролем, сервер возвращает ошибку 403.

Я использую ссылку под кодом: https://github.com/kagasu/GooglePlayStoreApi/blob/master/GooglePlayStoreApi/GooglePlayStoreClient.cs

  public async Task<string> GetGoogleToken()
        {
            var content = new FormUrlEncodedContent(new Dictionary<string, string>
            {
                { "androidId", AndroidId },
                { "lang", Country.GetCountryCode() },
                { "google_play_services_version", GOOGLE_PLAY_SERVICE_VERSION },
                { "sdk_version", "19" },
                { "device_country", Country.GetCountry() },
                { "callerSig", "38918a453d07199354f8b19af05ec6562ced5788" },
                { "Email", GoogleEmailAddress },
                { "get_accountid", "1" },
                { "add_account", "1" },
                { "service", "ac2dm" },
                { "callerPkg", "com.android.settings" },
                { "EncryptedPasswd", PasswordCryptor.EncryptPassword(GoogleEmailAddress, GooglePassword) },
            });

            var response = await client.PostAsync($"{API_ENDPOINT}/auth", content);
            var str = await response.Content.ReadAsStringAsync();
            var parameters = str.Split('\n').ToDictionary(x => x.Split('=')[0], x => x.Split('=')[1]);
            Token = parameters["Token"];
            return Token;
        }
...