Bluedot Tempo,
Android SDK version 15.3.2,
iOS SDK version 15.4.1 &
Canvas & Config API
released.
Details here.
How to authenticate with Config API
- Make a
POST
request to the/sessions
with your credentials{ "email": "user@email.com", "password": "Secret_Password_123" }
{ "statusCode": 201, "idToken": "string", "accessToken": "string", "refreshToken": "string" }
This is an example of how you would get the list of Projects
// NODE.JS const https = require('https'); const options = { host: 'config.bluedot.io', path: '/prod1/projects', headers: { 'Authorization': 'Bearer <accessToken>' } }; const data = [] https.get(options, (res) =>; { res.setEncoding('utf8'); res.on('data', chunk => { data.push(chunk) }); res.on('error', error => { console.error(error) }) res.on('end', () => { console.log(data); }) });
Expiry time of the Tokens
accessToken
: An Access Token is a credential that can be used by an application to access the Configuration API. It is active for 1 hour.
refreshToken
: The Refresh Token is a special token that can be used to obtain a renewed accessToken
. It is active for 60 days.
Best Practises on using the Session API
- Have a fail/retry strategy for using the access token – if it expires, catch the failure, reauthenticate to get a new access token and try again.
- The refresh token can be used, but for an m2m integration, it’s less important (the email/password can be used instead). The refresh token is typically used by less secure clients such as browsers.
Created by Melwin Chiramel on October 18, 2019