How to use SL APIs as consumer
Syncloop Platform Setup:
- Create a consumer group
- Create a new consumer user (System user)
- Assign this consumer user to the consumer group
- Consumer users should not be assigned to “developer” or “admin” groups
- Update the APIs you want to expose, to have that consumer group access
Consumer application:
- Consumer application will store the consumer user credentials in the application
- Consumer application will call SL getToken API and pass the user credentials to generate a token
- Default duration for the token is 30 days, this duration can be defined during the getToken API call
- This token can be used to call any API created on SL with a defined “Consumer group”.
- When the token expires, Consumer application can generate a new token using the same getToken API
Details for getToken API -
Endpoint: <host:port>/jwt/basic
Authentication Type: Basic
Method: GET
Params (optional) :
expiration_time – The token expiration duration (in hours). Default value for
expiration_time is 720 hours.