Hello,

I'm working on getting access to the API and I'm having trouble creating 
the Refresh Token. I have already created a project and requested an access 
code but I'm having trouble getting the last piece of the puzzle which is 
the Refresh Token so I can save it in my app. The following is the piece of 
code I'm using to try to get the Refresh Token....can you please help me 
with this? I'm getting a bad request in return. I'm using PowerShell

Thanks!

$TokenUrl = "https://accounts.google.com/o/oauth2/token";;
  
$body = @{
  code="XXXXXXXJgZ7UU0C-8xuZnXWq9YHXEoOGsxdBFejvr8#";
  client_id="XXXXXXXXXXXphr11odjh909gjmsgt30vpk.apps.googleusercontent.com";
  client_secret="XXXXXXXaCEb229ysHPJ";
  redirect_uri="http://localhost";;
  grant_type="authorization_code"; # fixed value
};

$json = Invoke-RestMethod -Uri $TokenUrl -Method POST -Body $body;

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/73daa2b0-9ec9-4724-91bf-68898d2ddc38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to