Sorry, you need to enable JavaScript to visit this website.

Regenerate Admin Key

 

Service version: 1
Last edit: 2019.09.18

On this page

Purpose

This endpoint is used to regenerate an Admin Key using a previous secret value.

  • Should an existing Admin Key become compromised, lost, or just needs to be changed for any reason, a new Admin Key can be generated using this endpoint.
  • At the same time, when a new Admin Key is regenerated the previous one gets revoked.

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/geofencing/versionNumber/regenerateKey?key=Your_API_Key

curl command

curl -v -XPOST -H "Content-type: application/json" -d
'{
   "secret": "secret_key"
 }'
'https://baseURL/geofencing/versionNumber/regenerateKey?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 number.
Value: 1
key
string
An API Key valid for the requested service.
Value: Your valid API Key.
Optional parameters
Note: There are no optional parameters in this endpoint.

Response data

Response body

{
  "adminKey": "admin_key_string"
}

Response fields

The following data tables describe 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 manage geofencing objects/fences/projects.

▲ Return to top

Examples

Example: Regenerate an Admin Key using a passed secret value.

Request format

https://baseURL/geofencing/1/regenerateKey?key=yPMFGLgBoejrRoWS8qYS

POST body format

{
  "secret": "My very secret secret"
}

Response body

The following JSON code block demonstrates a successful Response from the API server.

{
  "adminKey": "UpP9m2jg4PU6fWAFnvskU33CwfW24e17P0oTC5byUfUzMElS"
}

▲ Return to top

You are here