Authenticate every transfers request with your secret key and client identifier.
Required headers
http
Authorization: Bearer <secret_key>
X-Travelandz-Id: <public_key>:<profile_code>The profile code is persisted for your company and has the form dp_<12 alphanumeric>. You can copy the full X-Travelandz-Id value from your dashboard.
Keep the secret key on your server. Never ship it to a browser or a mobile app, and never write it to client logs.
Example
bash
curl --request GET \
--url "https://api.sandbox.travelandz.com/v1/transfers/amenities?currency=USD" \
-H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
-H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"Authentication errors
| HTTP | Code | Meaning |
|---|---|---|
401 | invalid_credentials | Authorization: Bearer is missing, malformed, or the profile code is invalid. |
401 | missing_api_token | Bearer was sent without a token. |
401 | missing_client_id | X-Travelandz-Id is missing or is not in the public_key:profile_code form. |
403 | invalid_credentials | The profile or credential does not exist, is inactive, or the secret key is wrong. |
403 | invalid_request_origin | The request origin is not allowed by the credential. |
503 | auth_service_unavailable | Credentials could not be verified. Retry with backoff. |