Skip to main content
POST
/
v2
/
auth
/
tokens
Create Authorization
curl --request POST \
  --url https://api.village.do/v2/auth/tokens \
  --header 'Content-Type: application/json' \
  --header 'secret-key: <api-key>' \
  --data '
{
  "external_user_id": "user_123",
  "email": "[email protected]"
}
'
{
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expires_in": 31536000,
    "expires_at": 1764739200,
    "token_type": "Bearer"
  },
  "metadata": {
    "request_id": "<string>"
  }
}

Authorizations

secret-key
string
header
required

App secret key (sk_xxx) for partner authentication

Body

application/json

Request body for creating an authentication token

external_user_id
string
required

Unique identifier for the user in your system

Required string length: 1 - 255
Example:

"user_123"

email
string<email>
required

Email address of the user

Response

Token created successfully

data
object
required

Authentication token response

metadata
object
required