Home > EnPower Web API > Get the Access Token
Export to PDFOnce you have the application (client) ID, you can retrieve the access token via the application (client) ID and client secret to authenticate with the EnPower Web API.
To get the access token with a client secret added during app registration, follow the steps below:
Set the access token URL (API endpoint) based on your organization’s AvePoint environment:
AOS commercial environment: https://identity.avepointonlineservices.com/connect/token
U.S. Government environment: https://identity-gov.avepointonlineservices.com/connect/token
Set the header to Content-Type: application/x-www-form-urlencoded.
Set the following parameters in the request body:
client_id – The Application (Client) ID of the app you registered in AvePoint Online Services.
client_secret – Copy the Client secret you added during the app registration.
scope – Set this value to enpower.data.read.all.
grant_type – Set this value to client_credentials.
POST https://identity.avepointonlineservices.com/connect/token
Content-Type: application/x-www-form-urlencoded
client_id={your_app_client_id}&client_secret={your_app_client_secret}&scope=enpower.data.read.all&grant_type=client_credentials
A successful request returns a JSON response containing the access token
| {"access_token":"eyJhbGciOiJSUzI1NiIsIm……","expires_in":3600,"token_type":"Bearer","scope":"enpower.data.read.all"} |
|---|
Note the following: