To access the API, you must first authenticate. Enter the login information for the Armor Management Portal (AMP). Review the following example:
POST /auth/authorize
{
"username": "user@domain.com",
"password": "password123%^&"
}
If the authentication is successful, you will receive the authorization code (code). Review the following example:
{
"redirect_uri": null,
"code": "<<base64-hash>>",
"success": true
}
Redeem the authorization code (code) to retrieve the access token. You must redeem this code within two minutes of the previous request. Review the following example:
POST /auth/token
{
"code":"<<base64-hash>>",
"grant_type":"authorization_code"
}
If the request is successful, you will receive the access token (access_token). Review the following example:
Enter the access token (access_token) to complete the authentication process. Review the following example:
(Optional) The access token expires every 15 minutes. If you want to extend the session, then you can request a new access token before the current access token expires. In this example, you do not need to authenticate again with the new access token. Review the following example:
(Optional) If the request is successful, you will receive a new access token without the ID token. Review the following example:
(Optional) If you have multiple accounts in AMP, you may want to specify the account to configure. Enter the integer for the account ID. Review the following example: