Skip to main content

Authentication

Authenticates a user and returns a JWT token to be used as a bearer token in subsequent API calls.

  • Credentials: Use the credentials you have received from your GeoX contact.
  • Scope: The same authentication token can be used for all the API routes.
  • Expiration: The authentication token expires after the duration specified in the expiresIn field of the response body. A new login is required to obtain a fresh token.

Login Request

To obtain a token, make a POST request to the login endpoint.

POST https://us-api.geox.ai/v1/login

Example Request

curl --location 'https://us-api.geox.ai/v1/login' \
--header 'Content-Type: application/json' \
--data '{
"username": "{{username}}",
"password": "{{password}}"
}'

Example Response

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}

Using the Token

Once you have obtained the token, include it in the Authorization header of your subsequent API requests as a Bearer token:

Authorization: Bearer <your_token_here>