0

We have a G Suite for Education. I want to create a new gmail user for each of our students.

I enabled Gmail as told in this documentation and downloaded the credentials.json file.

I than opened POSTMAN and created a post request for this URL:

https://accounts.google.com/o/oauth2/v2/auth

I used the parameters from credentials.json:

client_id: (as in json file)
response_type: code 
scope: openid%20email
redirect_api: http://localhost

The response is html of the login page. I tried token, id_token instead of code but response says unsupported_response_type.

What I try to do is to use the following request to create user, which says login required.

POST https://www.googleapis.com/admin/directory/v1/users

Am I on the wrong way?

tolga
  • 2,462
  • 4
  • 31
  • 57
  • 2
    Possible duplicate of [Using Postman to access OAuth 2.0 Google APIs](https://stackoverflow.com/questions/32076503/using-postman-to-access-oauth-2-0-google-apis) – ZektorH Nov 05 '19 at 14:37
  • Read this article: https://www.jhanley.com/google-oauth-2-0-testing-with-curl/ – John Hanley Nov 05 '19 at 15:02

0 Answers0