Getting information about OAuth 2.0 user


You can also use the access_token to get more information about the user, if necessary. You need to send a POST request to the URL:

https://worksection.com/oauth2/resource
The POST request must contain the required parameters:

PARAMETERDESCRIPTION
client_id
client_id, received when creating the application.
client_secret
client_secret, received when creating the application.
access_token
The access token that was obtained in the /oauth2/token method.

CURL example:

curl -X POST -d
"client_id=<client_id>&client_secret=<client_secret>access_token=<access_token>"
https://worksection.com/oauth2/resource
Example response:

{
   
"id": "11",
   
"first_name": "John",
   
"last_name": "Smith",
   
"email": "[email protected]", "account_url": "https://authorizeduseraccount.worksection.com"
}