Get my Refresh Token In PHP

291 views
Skip to first unread message

גרי סלוב

unread,
Mar 31, 2017, 11:50:19 AM3/31/17
to AdWords API Forum

im running localy the: "GetRefreshToken.php" file, im inserting all the parameters and when i hit the line:

"[OPTIONAL] enter any additional OAuth2 scopes as a space delimited string here ..."

im going to the

"https://accounts.google.com/o/oauth2/v2/auth?response_type=code&access_type=offline&client_id=..."

with my clientID, but then i hit enter to get the token it calls an error:
Error: invalid_request
Missing required parameter: scope.

what i am doing wrong?

Shwetha Vastrad (AdWords API Team)

unread,
Mar 31, 2017, 3:54:48 PM3/31/17
to AdWords API Forum
Hi, 

Could you send the code snippet where the scope is being set in your application? 

The URL which you paste in your browser should look like this: 

https://accounts.google.com/o/oauth2/auth?client_id=your-client-id&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords&redirect_uri=urn:ietf:wg:oauth:2.0:oob&access_type=offline&prompt=consent

Thanks,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages