I want to authenticate Gsuite users in order for them to be able to create groups from my company's application, I have to do so using CURL, what URL should I send a post request to?
For example, if I want to login a user to Google plus, I would hit this url
CURLOPT_URL => "https://www.googleapis.com/plus/v1/people/me?access_token=" . $access_token,
What url is for Gsuite?
If your goal is to retrive the information about a user in G Suite:
Note: Please consult the Directory API on how delegation is performed. This is required. Normal Access Tokens will not work without
Domain-wide Delegation
enabled.Your credentials (Access Token) will need the correct scopes:
Your credentials will need the correct delegation.
Python example:
Domain-wide Delegation
See the bottom of this answer for common errors that I have seen when setting up G Suite access.
If your goal is to retrieve information stored within a Google OAuth 2.0 Token:
These urls expects a Google OAuth 2.0 Access Token. The
alt=json
specifies returning JSON.Examples that you can test in a command prompt:
There is also the v3 endpoint for :
Common problems when setting up API access to G Suite:
Go to the Google Cloud Console. Enable the API for
Admin SDK
.You have not setup Domain-wide delegation correctly.
You tried to setup Domain-wide delegation on an existing service account. You need to create a new service account that does not have any IAM Roles assigned.