The last time I worked on AdWords API was about two years ago when 
ClientLogin was still supported for authorization. I see that no longer is 
the case now and I must move to using OAuth. I've been having a lot of 
trouble understanding how to do this.

I'm using server-side Javascript for this and cannot use any client 
libraries (didn't see any available for AdWords using Javascript anyways). 
I use Javascript to compose and parse the SOAP requests/responses.

Inside the guide it looks like I should just need to send a POST request to 
this URL with a few parameters (line breaks for readability):
https://accounts.google.com/o/oauth2/auth?
scope=email%20profile&
redirect_uri=http://localhost&;
response_type=code&
client_id=149278968815.apps.googleusercontent.com

However, when I try to do this, I receive a 400 Error saying that "The 
redirect URI in the request: http://localhost did not match a registered 
redirect URI."

I have the Redirect URI set within the Developer Console > APIs & auth > 
Credentials > OAuth client IDs and in there it shows http://localhost for 
the authorized Redirect URI. The other option I could find in the guide 
uses some variation of urn:ietf:wg:oauth:2.0:oob , but when I try to set 
the Redirect URI within this section to that, I am unable to and receive 
this error "Invalid Redirect: urn:ietf:wg:oauth:2.0:oob must use either 
http or https as the scheme"

All I'm trying to do from this is get an offline token that does not expire 
for a while (refresh token I believe is the term) that I can then use 
within the AdWords API calls I need to make. Can someone help me with 
figuring out what I'm doing wrong here?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
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/98f5d353-f7ea-4739-86f9-c4175da65145%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to