Authenticate with User Credentials

User Authentication

The /api/v1/authenticate API is used to generate a JWT auth_token which authenticates subsequent API calls. The request body must provide a username (typically the email address used when signing up) and the user password and in turn will receive an auth_token and refresh_token.

POST https://simforthings.bics.com/api/v1/authenticate

Request body

{
  "username": "user@domain.com",
  "password": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
}

Response

{
  "auth_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Using Auth Tokens ยป

User Refresh Token

The server will respond with an auth_token and refresh_token after successful user authentication. The auth_token is valid for 240 minutes for this token and so the refresh_token can be used to obtain a new auth_token without providing user credentials again.

POST https://simforthings.bics.com/api/v1/authenticate

Request body

{
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Response

{
  "auth_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}