POST/v1/auth/check-session

Valider une session API key

Confirms that the bearer token and X-Travelandz-Id header resolve to an active developer profile and API key for the current environment.

Confirms that the bearer token and X-Travelandz-Id header resolve to an active developer profile and API key for the current environment.

Endpoint

MethodPathAuth
POST/v1/auth/check-sessionRequired API key
Required headers:
HeaderDescription
AuthorizationBearer <secret_key>. The secret is shown only once when the credential is created.
X-Travelandz-Id<public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential.
Content-TypeUse application/json for requests with a body.

Success Response

json
json
{
  "session": {
    "profileCode": "dp_a1b2c3d4e5f6"
  }
}

Example

bash
bash
curl -X POST https://api.sandbox.travelandz.com/v1/auth/check-session \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"