Google APIs and Google Identity APIs not working

I am trying to learn the Google Identity Toolkit API using Google API Explorer. The API hints that "No authorization required", however, when I try to execute the request, I get an error message:

This method requires you to be authenticated. You may need to activate the toggle above to authorize your request using OAuth 2.0.

      

If I try to use the OAuth 2.0 switch and authorize the API, I get a 400 error:

Error: invalid_request

Missing required parameter: scope

      

But the Google Identity API does not declare any scopes.

Please can anyone help?

UPDATE: Additional errors when using the API: when trying to make a getAccountInfo request, I pass the request body with the localId field populated. The answer I get is:

400 OK

- Show headers -

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "INVALID_SERVICE_ACCOUNT"
   }
  ],
  "code": 400,
  "message": "INVALID_SERVICE_ACCOUNT"
 }
}

      

+3


source to share


2 answers


Here is a list of the Google API areas:

https://developers.google.com/identity/protocols/googlescopes#oauth2v2

This completely excludes the set of identifiers.

Binding on a random string in a scope throws an error:

enter image description here

I guessed what the area should be https://www.googleapis.com/auth/identitytoolkit

by looking at the template.

And this area does not cause an error. Thus, this means that this is a valid scope, even if it is undocumented.



However, I used the API request:

POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/downloadAccount?fields=kind%2CnextPageToken%2Cusers&key= {YOUR_API_KEY}

{"maxResults": 999}

And he produced:

200 OK

{"kind": "identitytoolkit # DownloadAccountResponse"}

So, I will say that I have successfully completed this request while using an undocumented function. However, it looks like the result from the server is wrong.

This should answer your question, although the result just shines on a broken server implementation.

I have reported no bugs / undocumented feature in this answer and would appreciate some help in this endeavor.

+1


source


You can find how to use the Google Identity Toolkit from the official site. If you really want to manually try the Google Identity Toolkit API, you need to enable the API in the Google Developers Console project, create an ApiKey in the project, and call the API using a command tool like curl. The syntax for the request must match the one shown in the Google API Explorer.



-1


source







All Articles