This document outlines how to access the Armor API system using the Pre-Shared Key (PSK) authentication method. This method applies to all Armor API's.
...
Note |
---|
Before you begin: If you access the Armor API system through an AMP-generated API Key, then you will not be able to access the following endpoints: GET /users/{id}/keys DELETE /users/{id}/keys/{key} POST /users/{id}/keys GET /users/{id:int}/ActivationCode POST /users/resetpassword POST /users/setpassword PUT /users/{id:int} POST /users/status POST /users/ POST /users/{userId:int}/invite GET /users/LockedOut/{accountId}/{email} POST /users/unlock/{accountId}/{email} DELETE /users/softDelete PUT /usersecurity/challengephrase GET /usersecurity/securityinformation/{referencekey} POST /usersecurity/securityinformation/{referencekey} POST /usersecurity/securityinformation/existing/{referencekey} GET /usersecurity/challengephrase/{userId} POST /usersecurity/validatemfaphone POST /usersecurity/securityinformation/{accountId}/{userId} POST /usersecurity/validatephoneapppin
|
...
Expand |
---|
title | Step 3: Make an API Call |
---|
|
To review the API calls, as well as implement the calls, access the interactive Armor API tool at https://developer.armor.com/. |
...
Excerpt |
---|
hidden | true |
---|
name | fhauth-legacy |
---|
|
Note |
---|
Before you begin: The base URL is https://api.armor.com. This endpoint requires TLS 1.2+. The API uses standard OAuth authentication. If you intend to use your account as an API service account, please contact Armor Support to update the MFA setting on the account. If your Armor Management Portal (AMP) account requires multi-factor authentication (MFA), you should configure your HTTP client to have a timeout that allows sufficient time to enter the MFA response.
|
To access the API, you must first authenticate. Enter the login information for the Armor Management Portal (AMP). Review the following example. Code Block |
---|
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. Code Block |
---|
{
"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. Code Block |
---|
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. Code Block |
---|
{
"access_token": "<<32-bit-uuid>>",
"id_token": "<<base64-hash>>",
"expires_in": 15,
"token_type": "Bearer"
} |
Enter the access token (access_token) to complete the authentication process. Review the following example. Code Block |
---|
Authorization: FH-AUTH <<access_token>> |
(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. Code Block |
---|
POST /auth/token/reissue
{
"token": "<<32-bit-uuid>>"
} |
(Optional) If the request is successful, you will receive the previous access token without the ID token. Review the following example. Code Block |
---|
{
"access_token": "<<32-bit-uuid>>",
"id_token": null,
"expires_in": 15,
"token_type": "Bearer"
} |
(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. Code Block |
---|
X-Account-Context: <<int>> |
Note |
---|
There are two ways to retrieve your account ID: Via the command line: | 1. In the command line, enter the
GET /me command. Via AMP: | 1. Access the Armor Management Portal (AMP).
| 2. On the left-side navigation, click
Account. | 3. Copy the number in
Account Number. | 4. In the command line, for
X-Account-Context, enter the Account Number. |
|
Excerpt |
---|
hidden | true |
---|
name | Create API Key |
---|
|
Note |
---|
When you create an API Key, you will generate a Secret Key. This key does not expire; you must securely store this key because Armor cannot retrieve this key for you. If you lose the Secret Key, then you must delete the corresponding API Key in AMP. Afterwards, you must create a new API Key. Armor cannot retrieve your Secret Key. |
In the Armor Management Portal (AMP), in the left-side navigation, click Account. Click Users. Click API Keys. Click the plus icon. Enter a descriptive name, and then click Create Key. Copy the Key ID and Secret Key. Click Close. The API Keys table will display a new entry.
|