Authenticating with the API¶
The Smart API uses OAuth 2.0 for authentication
Currently, Smart only supports the Client Credentials grant type to obtain an access token outside of the context of a user. This grant type enables access to all published data for a project within Smart. Currently, only the client_id is required to access published data.
Create a new POST request with the following:
|client_id||Your API Client Id|
Make sure the grant_type and client_id are in the Body of the request and that x-www-form-urlencoded is selected.
The server will return JSON containing the Bearer Token/Access Code which you will require to fetch data.
The Access Token expires after 24 hours at which point you will need to fetch a new token using this method.
Make a note of your Access Token (It will be different to the one in this screenshot).
Once you have your Access Token, you can fetch data from your project, see Fetching Data using the API.
Use the following settings to test the API in the Demo Project
You should receive an Access Token that you can use to Fetch Data