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?