Skip to main content
POST
/
auth
/
token
Create API Token
curl --request POST \
  --url https://api.wizcommerce.com/auth/token \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "user@example.com",
  "password": "password123"
}'
{
  "token_id": "token_123",
  "token_type": "Bearer",
  "expires_at": "2026-01-01T00:00:00Z",
  "user": {
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "tenant_id": "tenant_456",
    "id": "user_123"
  },
  "access_token": "api_prod_abc123..."
}
Please note that generated tokens will be expired after 1 year automatically. Once it is expired, please generate new token.

πŸ” Security Notice

Important: Keep your API token secure and never share it publicly.
  • βœ… Store securely: Save the access_token in a secure location
  • βœ… Use in headers: Include as X-API-Key header in all API requests
  • βœ… Don’t commit: Never commit tokens to version control
  • βœ… Rotate regularly: Generate new tokens periodically for security

πŸ“‹ Example Usage

curl -X GET https://api.wizcommerce.com/v1/products \
  -H "X-API-Key: YOUR_ACCESS_TOKEN_HERE"

⚠️ Token Security

  • Never expose your token in client-side code
  • Use environment variables to store tokens
  • Regenerate if you suspect it’s been compromised

Body

application/json

Login credentials

email
string
required
Example:

"user@example.com"

password
string
required
Example:

"password123"

Response

OK

token_id
string
Example:

"token_123"

token_type
string
Example:

"Bearer"

expires_at
string
Example:

"2026-01-01T00:00:00Z"

user
object
access_token
string
Example:

"api_prod_abc123..."