Hi Team, Below I am attached my format of code to generate Toke , but I am getting Error , please suggest me .. -------------------------------------------------------------------------------------------------------------------------------------- The Error I am getting: { "error": "invalid_grant", "error_description": "Bad Request" } -------------------------------------------------------------------------------------------------------------------------------------- string clientId = _configuration["GoogleAPISettingsAuth:client_id"]; string clientSecret = _configuration["GoogleAPISettingsAuth:client_secret"]; string redirectUrl = _configuration["GoogleAPISettingsAuth:redirect_url"]; http.DefaultRequestHeaders.Clear(); string url = "https://oauth2.googleapis.com/token"; url += "?code=" + code + "&client_id=" + clientId + "&client_secret=" + clientSecret; url += "&redirect_uri=" + redirectUrl + "&grant_type=authorization_code"; http.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage httpResponse = await http.PostAsJsonAsync(url, new object()); string strResponse = httpResponse.Content.ReadAsStringAsync().Result;
---------------------------------------------------------------------------------------------------------------------------------------------- -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/6f961318-a774-4234-89a1-1f808e6be700n%40googlegroups.com.