OAuth APIs

This section shows the Rest API end-points of OAuth Server.

Table of contents

Login

This API end point returns a token which should be added to the x-access-token header, for all other API requests.

POST /auth/login

The device_key and customer_key are obtained from the asvin dashboard. The timestamp is unix epoch.The device_signature is HMAC-SHA256. The Device Signature section contains calculation details.

Request Headers

Example request:

$ curl --location --request POST 'https://oauth-server/auth/login' \
 --header 'Content-Type: application/json' \
 --data-raw '{
     "device_key": "your-device-key",
     "timestamp": 1620045991
     "device_signature": "your-device-signature"
 }'

Example response:

{
  "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MDYunDk4ODYsImV4cCI6MTYwNjMxMDQ4Nn0.CCWvzR124OGf5FFOFAObQDPNRlmtI_kaObtu0X-eNFpJUaHv5kfjfGzZl4PUVXTOidSC4SJXFLACqOgyY7gb1UiHI3S47KvhIdCLgte8BvEIyIWLLj4rD4mdWT4NeRkP67-AXUG9IVM7_6XaGB-xmVLD-cLKFimlH7wANeDxO51gOgbcO5CP-1LQKuc2ApYPnDwtJMbkLIcQ-f7k81ouiiOWKOsB-cXq8yqt85WV4BJADhTDbvm3kjAQ5AEOpi7cU_sxh4JG4RaFKz7mNAanvHTw7LbZmP6tcvcf-bvcqTkkb0nkstXCD6300mBe4D44gY-7OehM1HF7xUS6nYpnIw"
}
Response Headers
  • Content-Type – application/json

  • X-RateLimit-Limit – 10

  • X-RateLimit-Remaining – 9

  • X-RateLimit-Reset – 1617352926

Status Codes