Get token

Generates a JSON Web Token (JWT) that must be included in the header of all subsequent API requests to access protected resources.

POST/api/authentication/generateJWT

Request

cURL
curl -X POST "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/authentication/generateJWT" \
  -H "Authorization: Bearer $SODTRACK_TOKEN" \
  -H "x-api-key: <your-x-api-key>" \
  -H "origin: <your-origin>"

Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com Β· other environments

Headers

NameTypeDescription
x-api-keystringstring API Key provided by Sodtrack. This key identifies and authenticates your integration.
originstringstring The origin domain or identifier associated with your Sodtrack API access (e.g., dev.api.cl.sodtrack.sodtrack.com).

Responses

Get token response
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmlnaW4iOiJkZXYuYXBpLmNsLsXdRHRyYWNrLnNvZHRyYWNrLmNvbSIsImlhdCI6MTczNjQ5MDE5OSwiZXhwIjoxNzM2NDkwNDk5fQ.21hkIFzXb1psNTqjPD8AuMq_eqeLFnzK44HT3CUXGDY"
}

Error responses for this endpoint follow the shared error reference.

Generates a JSON Web Token (JWT) that must be included in the header of all subsequent API requests to access protected resources.

Each token is issued using the API Key and Origin assigned to your organization. Tokens are time-limited and must be regenerated upon expiration.

Usage

Once generated, include the JWT in the Authorization header for all API calls:

code
Authorization: Bearer {token}

Security Recommendations

  • πŸ”’ Treat your API Key and JWT as sensitive credentials.

  • ⏱ Refresh tokens periodically before expiration to avoid interruptions in service.

  • ❌ Do not expose your credentials in client-side applications, browser code, or public repositories.

  • βœ… Use secure HTTPS connections at all times.