Clinked
Clinked only lets you create an OAuth client through the API. This explains how to generate the OAuth client ID and secret.
These examples use the
uuid
and jq
utility linux commands. uuid
simply generates a GUID and jq
outputs JSON in a neater format.Either:
1) install these:
sudo apt install uuid
sudo apt install jq
or
In the command below substitute
<USERNAME>
and <PASSWORD>
for the username and password of a Clinked administrator.curl 'https://api-p1.clinked.com/oauth/token?client_id=clinked-mobile&grant_type=password&username=<USERNAME>&password=<PASSWORD>&code=12345' -H 'Accept: application/json'
This returns some JSON:
{
"access_token": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"token_type": "bearer",
"refresh_token": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"scope": "read write"
}
Take a copy of the contents of
access_token
.Substitute
<ACCESS_TOKEN>
for the access token you received:deviceToken=uuid
curl 'https://api-p1.clinked.com/v2/applications' -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Bearer <ACCCESS_TOKEN>' -d '{ "deviceType" : "Other","appVersion" : "1.0","deviceOs" : "Other","name" : "Trelica","bundleId" : "com.trelica","description" : "Trelica","deviceModel" : "Trelica","platform" : "OTHER","deviceToken" : "${deviceToken}" }' | jq
This should return a long piece of JSON. Read through it and find the
clientId
and clientSecret
attributes:"clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Paste the values for these attributes into Trelica when you connect Clinked.
Last modified 1yr ago