Authentication
To invoke a Symbl API call, you must have a valid Access Token generated using the valid application credentials. If you don't already have your app id or app secret, log in to the platform to get your credentials.
In this example we use the following variables which you must replace in the code examples for the code to work:
Key | Description |
---|---|
APP_ID | The application ID you get from the Symbl Platform. |
APP_SECRET | The application secret you get from the Symbl Platform. |
#
Code ExampleYou can view the cURL, Node.js and Python code to generate the Access Token. The Node.js code should work with Node.js 7+ and browsers. You will need to install the request library for the Node.js sample code:
- cURL
- Node.js
- Python
$ npm i request
For a valid APP_ID
and APP_SECRET
combination, the success response will be returned like this.
accessToken
- Token to be used for authorization in the Authorization header.
expiresIn
- Duration in seconds after which the accessToken expires.
For any invalid appId
and appSecret
combination, the HTTP 401 Unauthorized
response code will be returned.