Authentication Service
Bhutan NDI API is secured by OAuth 2.0 authentication provided by AWS Cognito. The authentication service exposes an API to generate a JWT access token which needs to be passed as Authorization header. All Bhutan NDI API must be made over HTTPS and if an access token is invalid, expired or not provided, the response will be a status code of 401, i.e., Unauthorized Access.
Note: The client ID and client secret will be shared separately by the Bhutan NDI team.
Swagger URL: Authentication Swagger URL
curl -X 'POST' \
'https://staging.bhutanndi.com/authentication/v1/authenticate' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"client_id":"<CLIENT_ID>",
"client_secret":"<CLIENT_SECRET>",
"grant_type":"client_credentials"
}'