Page tree


Knowledge Base


Feedback

Have a suggestion for the Armor Knowledge Base?

Send a message to
kb@armor.com.









The Post Token API creates an authentication token from an authorization code. 

This API call applies to both Armor Complete and Armor Anywhere users.

Before you redeem an authorization token, you must create a temporary authorization code. To create a temporary authorization code, see Post Authortize

Sample Request

POST https://api.armor.com/auth/token

{
"code":"HJTX3gAAAAN2q1UP7cvFtOh1qffrfWIpKetdnIgvOfpJRSC5W7b3vVqMBn8pZHtRY8I4nLRzW95gdWPdRMVUrgsnJ2mwqB8kgxOu8lhH1LOggfwrRCvxLGvGmwET59gIzJ60rxpEdM0dTLw58kNnWVbaQI1NmPQJwjvD/1RIPTnOL5d+z29wyJ/BI/POlPKNlVfHsJGYJl8ql0/3D3czNGhXCqfV20Uj0r8EX7zsQz/9t1YCqKKj9OpPv3sypXS6h4hNb/v4yLD33G+EnwOajJQ62sA=",
"grant_type":"authorization_code"
}

Input


The following table describes the different parts of this API call: 

API Call / URLMethod / Type
/auth/tokenPOST


The following table describes the parameter (or parameters) for this API call:

ParameterDescriptionFormatRequired or optionalExample
codeThe code you received from the Post Authorize call.GUIDRequired
HJTX3gAAAAN2q1UP7cvFtOh1qffrfWIpKetdnIgvOfpJRSC5W7b3vVqMBn8pZHtRY8I4nLRzW95gdWPdRMVUrgsnJ2mwqB8kgxOu8lhH1LOggfwrRCvxLGvGmwET59gIzJ60rxpEdM0dTLw58kNnWVbaQI1NmPQJwjvD/1RIPTnOL5d+z29wyJ/BI/POlPKNlVfHsJGYJl8ql0/3D3czNGhXCqfV20Uj0r8EX7zsQz/9t1YCqKKj9OpPv3sypXS6h4hNb/v4yLD33G+EnwOajJQ62sA=
grant_type

The type of permission

(You must enter authorization_code.)

StringRequiredauthorization_code

Sample Return

StatusResponse
200
{
 "access_token":
"2261bac252204c2ea93ed32ea1ffd3ab",
 "id_token": "HJTX3gAAAAPXvOfOf4TA4lvblRjDTKbVo/NZEWCXF0KK7BMlJhcvfPXJ/nRzFJpY1eFX0gpBHFyGQPXp3Ev/cGvbfC9FEpkBTCpqh0bsne0t/Zvfxd2FVW6DZMDs5qQSgcMeEAhjlrCWwSoK4AgnqjtFuRdAkD5DeAlfQGbxHS3NzCMlAwLdoxRmbN+BzGUf86bSlen5cxFlktGIAftIxENgSMOUJOhV7ILOhry6qYr590dWRkIyQ6IIGghKaASs+hoViI0YNfKuct32sH73+S9YD87ik2Un",
 "expires_in": 15,
 "token_type": "Bearer"
}

In this output, expires_in is displayed in minutes.