Authentication
How it works
You must be a verified MRI OnLocation user to make API requests. This is an SSL-only API and is authenticated using API key authentication.
You can use either an authentication header or basic authentication.
Example header with API key
The authentication header contains the word APIKEY followed by a space and the API key in plaintext.
curl -i -X POST \
https://api.whosonlocation.com/v1/location \
-H 'Content-Type: application/json' \
-H 'Authorization: APIKEY abcdef1234567890' \
Basic authentication example
curl -u abcdef1234567890: https://api.whosonlocation.com/v1/staff
Manage your keys in the API Management screen in OnLocation. API keys can be restricted to the following data:
- Unrestricted
- Locations/Access Points/Departments
- Notifications
- Certifications
- Contractors
- Staff (employees)
- Visitors
Add an API key
You must have the Account Owner or IT Support user role to access to add an API key.
- Log in to OnLocation.
- Go to Tools > Account.
- Select API from the menu on the left.
- Click Add Key.
- Select any access restrictions.
- Accept the Application Developer and API Agreement, then click Generate Key.
- Click Close this Message.
To add another key, click Add Another on the API Management screen.
Remove a key
You must have the Account Owner or IT Support user role to add an API key.
- Log in to OnLocation.
- Go to Tools > Account.
- Select API from the menu on the left.
- Click Remove next to the API Key.
- Click Remove to confirm.