Locoia
Search…
Locoia API Authentication
Authentication with our API of Locoia itself
Locoia uses Oauth2. Contact one of our Solutions Consultants to get all details regarding API access, such as client_id and client_secret.
Alternatively, to avoid setting up a fully blown Oauth2-client, you can also receive a refresh-token to get a fresh access_token, whenever needed.
1. Create a user in Locoia specifically for API requests.
2. Based on the client_id and client_secret from Locoia, use PostMan's authentication feature to get the refresh_token. Select OAuth 2.0., as per the below screenshot, and input the following details:
    Auth URL: https://dynamicinsight.auth.eu-central-1.amazoncognito.com/oauth2/authorize
    Access Token URL: https://dynamicinsight.auth.eu-central-1.amazoncognito.com/oauth2/token
    Client ID: my_client_id
    Client Secret: my_client_secret
    Scope: email openid
After filling in all of the above details, click `Get New Access Token` and you will be redirected to an Authentication Screen. Enter the user credentials of the previously created user. Now you should get the refresh_token, among other details, for this user.
3. Ongoing refreshing: To get a valid access_token based on a refresh_token, please proceed on the request as follows:
1
POST https://dynamicinsight.auth.eu-central-1.amazoncognito.com/oauth2/token
2
3
HEADERS:
4
Content-Type="application/x-www-form-urlencoded"
5
Authorization=Basic base64(my_client_id:my_client_secret)FORM URLENCDODED:
6
grant_type=refresh_token&
7
client_id=my_example_client_id&
8
refresh_token=REFRESH_TOKEN
Copied!
4. The access_token can now be used in the following format as a header:
Authorization: Bearer ey... where ey.. is the access_token
Last modified 26d ago
Copy link