Create auth token for user

POST /v1/publishers/auth/s2s

This endpoint is used to authenticate a user using an publisher user id. The access token is validated and a new authentication token is returned. This token can be used to authenticate the user in the future.

application/json

Body Required

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
  • 406 application/json

    VPN detected

    Hide response attribute Show response attribute object
POST /v1/publishers/auth/s2s
curl \
 -X POST https://api.bitlabs.ai/v1/publishers/auth/s2s \
 -H "X-S2S-Token: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"user_id":"string"}'
Request example
{
  "user_id": "string"
}
Response examples (200)
{
  "data": {
    "access_token": "string",
    "refresh_token": "string"
  }
}
Response examples (406)
{
  "error": {
    "details": {
      "http": "406 Not Acceptable",
      "msg": "vpn detected"
    }
  }
}