Hi,
I am setting up API access for dfp based on the instructions given here
I am using a script as below
from googleads import oauth2
from oauth2client import client
flow = client.OAuth2WebServerFlow(
client_id = CLIENT_ID,
client_secret = CLIENT_SECRET,
scope = oauth2.GetAPIScope('dfp'),
user_agent = 'Test',
redirect_uri = REDIRECT_URI
)
auth_uri = flow.step1_get_authorize_url()
I get an auth_uri as below
I use this url to get an auth_code
Now when I run
credentials = flow.step2_exchange(auth_code)
I get the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/oauth2client/client.py", line 2089, in step2_exchange
raise FlowExchangeError(error_msg)
oauth2client.client.FlowExchangeError: invalid_grantMalformed auth code
Any idea what could be going on here ?
Thanks
Sibi