Change customer secret
Service version: 1
Last edit: 2019.09.18
On this page
- ▸ Purpose
- ▸ Request data
Purpose
This endpoint is used to update a secret using an old secret. If an old customer secret needs to be changed, use this endpoint to do it.
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 normal text.
https://baseURL/geofencing/1/updateSecret?key=Your_API_Key
curl command
curl -v -XPOST -H "Content-type: application/json" -d
'{
"secret": "Enter an old_secret",
"newSecret": "Enter a new_secret"
}'
'https://baseURL/geofencing/1/updateSecret?key=Your_API_Key'
POST Request body
{
"secret": "Enter an old_secret",
"newSecret": "Enter a new_secret"
}
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 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 manage geofencing objects/fences/projects. |
HTTP Response codes
:
Code | Meaning and possible causes |
---|---|
200 |
OK:
|
204 |
No content: Secret has been replaced with new secret. |
400 |
Bad request: Missing or invalid request data. |
401 |
Unauthorized: Provided secret is invalid. |
403 |
Forbidden: Each customer can register only one configuration. |
Examples
Example: Update a secret using an old secret.
Request format
https://baseURL/geofencing/1/updateSecret?key=yPMFGLgBoejrRoWS8qYS
POST body format
{
"secret": "My very secret secret",
"newSecret": "My very secret newSecret"
}
Response body
{
"adminKey": "admin_key_string"
}