Authentication
Apptopia supplies a client ID and secret when your Data API account is set up. Exchange these credentials for a JSON Web Token (JWT), then use that token for data requests.
Create a session
Section titled “Create a session”POST https://integrations.apptopia.com/api/login
Send the following form fields with Content-Type: application/x-www-form-urlencoded:
| Field | Description |
|---|---|
client |
Your API client ID. |
secret |
Your API secret. |
The JSON response has this shape:
{ "token": "YOUR_SESSION_TOKEN" }The documented default session lifetime is two weeks. Authenticate again when your token expires.
Authorize a request
Section titled “Authorize a request”Set the Authorization header to the returned token itself:
Authorization: YOUR_SESSION_TOKENThe API uses the raw token in this header. Do not add a Bearer prefix.
Try the authentication flow
Section titled “Try the authentication flow”Sign in below, then send a request to the country-list endpoint. You can also paste an existing token without entering your client ID or secret.
The playground retains the token in page memory. The secret field is cleared after a successful sign-in, and Clear credentials removes the token and any displayed response. Reloading or leaving the page also clears the session.
Troubleshoot sign-in
Section titled “Troubleshoot sign-in”- Confirm that you are using Data API credentials supplied by Apptopia.
- Check for leading or trailing whitespace in the client ID, secret, or token.
- Use form encoding for
/api/loginand JSON encoding for search requests. - If a data request returns
401, create a new session. If it returns403, check access to that dataset with your Apptopia contact.