Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document outlines how to use the Legacy authentication method. This method applies to all Armor API's (v2 and Legacy).

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.

Expand
titleSteps to Authenticate into the Armor API System



  1. To access the API, you must first authenticate. Enter the login information for the Armor Management Portal (AMP). Review the following example:

    Code Block
themeMidnight
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
  • themeMidnight
    1. {
       "redirect_uri": null,
       "code": "<<base64-hash>>",
       "success": true
      }
      


    2. 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
    themeMidnight
    1. POST /auth/token
       
      {
        "code":"<<base64-hash>>",
        "grant_type":"authorization_code"
      }
      


    2. If the request is successful, you will receive

    the 
    1. the access token (access_token). Review the following example:

      Code Block
    theme
    Midnight
    1. {
       "access_token": "<<32-bit-uuid>>",
       "id_token": "<<base64-hash>>",
       "expires_in": 15,
       "token_type": "Bearer"
      }
      


    2. Enter the access token (access_token) to complete the authentication process. Review the following example:

      Code Block
    themeMidnight
    1. Authorization: FH-AUTH <<access_token>> 
      


    2. (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
    theme
    Midnight
    1. POST /auth/token/reissue  
      
      {   
      	"token": "<<32-bit-uuid>>" 
      }  
      


    2. (Optional) If the request is successful, you will receive a new access token without the ID token. Review the following example:

      Code Block
    themeMidnight
    1. {  
       "access_token": "<<32-bit-uuid>>",  
       "id_token": null,  
       "expires_in": 15,  
       "token_type": "Bearer" 
      } 
      


    2. (Optional)

     If
    1. 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
    themeMidnight
    1. X-Account-Context: <<int>>
      


      Note

      There are two ways to retrieve your account ID:

      Via the command line:

      1.

     In
    1. In the command line, enter the GET /me command.

      Via AMP:

      1.

     Access
    1. Access the Armor Management Portal (AMP).

      2. On the left-side navigation,

    click 
    1. click Account.

     
    1. 3. Copy the number

    in 
    1. in Account Number.

     
    1. 4. In the command line, for X-Account-Context, enter the Account Number.


    ...