Authentication (Getting a new API Key) Authentication (Getting a new API Key)

Authentication (Getting a new API Key)

Josh Lavulo-Hodges Josh Lavulo-Hodges

To authenticate your requests to the API you must have an API Key. An API key can be generated by making a request using the Base URL, Tenancy ID, Username and Initial Refresh Token provided by Pursuit Technology.

 

Request Parameters
Request Method GET
Request URL {base_url}/local/acorn_tenancymanagement/index.php/tenancies/{tenancy_id}/apikeys?username={username}
Authorisation Header Bearer {refresh_token}

 

Example Response:

{ 
"success": "true",
"api_key": "aENNeEQ4SnU3SDVPdnV4bkhkUFIydlJDVzFCM0VFSVpEc1dwOHU2TQ==",
"expires_in": "86400",
"refresh_token": "aGdYTW0zbWdBb2EzRkU3dkl4VDhEZ0hXWml3SlJMdmp0Qlh5RklqZw=="
}

 

The API Key and Refresh Token should be stored in a secure location once received. Each API Key is only valid for 24 hours. The most recent Refresh Token can be used to request a new API Key and Refresh Token at any time. Requesting a new API Key and Refresh Token will cause the previous API Key and Refresh Token to become invalid.

Add comment

Please sign in to leave a comment.