All v3 Local Logic APIs use access tokens (JSON Web Tokens) to authorize requests and no longer require API keys.
Token Retrieval
Tokens can be retrieved from the api.locallogic.co/oauth/token API with a client_id and a client_secret as query parameters, which we will send to you privately. Make sure to keep these credentials in a safe place!
Example: api.locallogic.co/oauth/token?client_id={CLIENT_ID}&client_secret={CLIENT_SECRET} will return a response similar to the following:
{
"access_token":"YOUR.ACCESS.TOKEN",
"token_type":"Bearer"
}
Token Usage
This token must be used in the Authorization Header for all v3 API requests. Remember to include the word Bearer at the beginning of the authorization string.
Issued tokens expire within 24 hours of retrieval to improve security (if a token is somehow leaked, it won’t be usable forever), so we recommend retrieving the token just prior to all v3 API calls. For example, in NodeJS it could be implemented as follows:
Add the following script to your HTML page or template. Make sure to replace the YOUR_TOKEN placeholder with the token we provided to you. If you don’t have a token, contact us.