Register Admin Key
Service version: 1
Last edit: 2019.09.18
On this page
Purpose
This endpoint is used to register a customer.
- Before a customer can use the service, or act as an Admin for Location History endpoints, they must register.
- Registering creates a configuration for the customer and creates an Admin Key, used to create/edit/delete Location History data.
Request data
HTTPS method: POST
URL format
For ease of viewing and identification:
- Required constants and parameters are shown in bold text.
- Optional parameters are shown in plain text.
https://baseURL/locationHistory/versionNumber/register?key=Your_API_Key
curl command
curl -XPOST "Content-type: application/json" -d
'{
"secret": "your_secret"
}'
'https://baseURL/locationHistory/versionNumber/register?key=Your_API_Key'
POST Request body
{
"secret": "secret_key"
}
Request parameters
The following table describes the parameters that can be used in a Request.
- Required parameters must be used or the call will fail.
- Optional parameters may be used.
- If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
- The order of request parameters is not important.
Required parameters | |
---|---|
Parameter | Description |
baseURL string |
The base URL for calling the API. Value: api.tomtom.com |
versionNumber string |
Service version. Value: 1 |
key string |
An API Key valid for the requested service. Value: Your API Key |
Optional parameters | |
Note: There are no optional parameters in this endpoint. |
Response data
Response body
The following JSON code block demonstrates a successful Response from the API server.
{
"adminKey": "admin_key"
}
Response fields
The following table describes all of the fields that can appear in a Response.
Primary fields | |
---|---|
Field | Description |
adminKey string |
A generated Admin Key that can be used to administer location history objects. |
HTTP Response codes
Code | Meaning and possible causes |
---|---|
200 |
OK: Configuration registered. Admin Key regenerated. |
400 |
Bad request: Missing or invalid request data. |
403 |
Forbidden: Each customer can register only one configuration. |
Examples
Example: Register a customer account using a passed secret value.
HTML Method: POST
https://api.tomtom.com/locationHistory/1/register?key=Your_API_Key
POST Request body (JSON)
{
"secret": "My very secret secret"
}
Response body
{
"adminKey": "UpP9m2jg4PU6fWAFnvskU33CwfW24e17P0oTC5byUfUzMElS"
}