Missing something wrt OAuth 2.0

65 views
Skip to first unread message

Kruttika Swaminathan

unread,
Apr 27, 2021, 10:43:16 AM4/27/21
to Authorized Buyers API Forum
I keep seeing the following error while trying to use the new Real-time Bidding Migration API. Any idea what's missing? I've done all the necessary steps.
Error executing update: ('No access token in response.', {'id_token': '<id_token>'}), traceback: [<FrameSummary file <file.py>, line 246 in <module>>, <FrameSummary file  <file.py>  , line 95 in main>, <FrameSummary file /python3.6/site-packages/googleapiclient/_helpers.py, line 134 in positional_wrapper>, <FrameSummary file /python3.6/site-packages/googleapiclient/http.py, line 929 in execute>, <FrameSummary file /python3.6/site-packages/googleapiclient/http.py, line 191 in _retry_request>, <FrameSummary file /python3.6/site-packages/google_auth_httplib2.py, line 209 in request>, <FrameSummary file /python3.6/site-packages/google/auth/credentials.py, line 133 in before_request>, <FrameSummary file /python3.6/site-packages/google/oauth2/service_account.py, line 377 in refresh>, <FrameSummary file /python3.6/site-packages/google/oauth2/_client.py, line 199 in jwt_grant>, <FrameSummary file <string>, line 3 in raise_from>]

Mark Saniscalchi

unread,
Apr 27, 2021, 1:30:43 PM4/27/21
to Authorized Buyers API Forum
Hello Kruttika,

If I had to guess based on the error output, it sounds like you're using the Service Account flow, but something is going wrong such that the access token isn't being returned. It's difficult to troubleshoot based on that message alone, but one idea is that the key file you specified might be corrupted in some way–consider downloading a fresh copy from the Google Developers Console.

In the event you haven't seen them yet, I'd also recommend starting out with the Python samples as a point of reference.

Regards,
Mark

Mark Saniscalchi

unread,
Apr 27, 2021, 6:01:59 PM4/27/21
to Authorized Buyers API Forum
Circling back to this thread, we discussed this issue separately and realized that the underlying cause was a misconfigured scopes keyword argument provided to the service_account.Credentials.from_service_account_file method. The error occurred when the value specified was a string, as the method expects a list of strings (there can be more than one scope specified).

Regards,
Mark
Reply all
Reply to author
Forward
0 new messages