You need an API Token to send API requests through the ThingSpace Platform. If you haven’t registered or signed in, you won’t have access to your token to use in your application or with the API console. You must register and sign in to be able to get keys and generate tokens to send real API requests.
Your application must send an API token in the header of every API request. We use the OAuth2 “client credentials” grant type, and we require that the application key and secret are Base64 encoded. To obtain an API token:
curl -X POST -d "grant_type=client_credentials" -H "Authorization: Basic BASE64_ENCODED_APP_KEY_AND_SECRET" -H "Content-Type: application/x-www-form-urlencoded" "https://thingspace.verizon.com/api/ts/v1/oauth2/token"
The response will contain a token that you must include in the header of all Device Location API requests. The token will be valid for one hour from when it was first issued, and any further
token requests during that hour will return the same token.
You can revoke a token with this request format (user your token in place of TokenToRevoke), and then the next
token request will return a new token:
curl -i -X POST -H "Authorization: Basic BASE64_ENCODED_APP_KEY_AND_SECRET" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=client_credentials&token=TokenToRevoke" "https://thingspace.verizon.com/api/ts/v1/oauth2/revoke"
The response contains the revoked token in the header; there is no response body.