Get a token from api key (public)

POST /auth/token

Will genereate an api token from the api key

Headers

  • X-Popsell-Domain string Required

    The domain of the user

application/json

Body

  • api_key string Required

Responses

  • 200 application/json

    Return the api token

    Hide response attribute Show response attribute object
    • token string
  • 401 application/json

    Unauthorized

    One of:
  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

POST /auth/token
curl \
 --request POST 'https://domain.tld/api/v2/auth/token' \
 --header "Content-Type: application/json" \
 --header "X-Popsell-Domain: example.com" \
 --data '{"api_key":"string"}'
Request examples
# Headers
X-Popsell-Domain: example.com

# Payload
{
  "api_key": "string"
}
Response examples (200)
{
  "token": "string"
}
Response examples (401)
{
  "message": "Unauthorized."
}
{
  "message": "Invalid email or password"
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}