Build with the REST API
This quickstart takes you from partner credentials to an authenticated request. At the end, you will have an access token ready for user, subscription, consultation, and other API operations.
Prerequisites
Section titled “Prerequisites”- An Abi partner account.
- The credentials and environment details supplied by Abi.
- A server-side application that can keep credentials secret.
-
Choose your environment
Use the production base URL assigned to your European integration.Use the Hong Kong base URL supplied with your partner account.Use the China base URL supplied with your partner account. -
Request an access token
Send your partner credentials to the authorization token endpoint described in the generated API reference. Access tokens are returned as bearer tokens.
-
Send the token with API requests
Send the bearer token in the
Authorizationheader. Use one of the examples below as a starting point. -
Handle token expiry
Store tokens securely and refresh them through the documented refresh flow. Do not wait for repeated unauthorized responses before refreshing.
Request examples
Section titled “Request examples”curl --request GET \ --url "${ABI_API_BASE_URL}/user/{id}" \ --header "Authorization: Bearer ${ACCESS_TOKEN}"const response = await fetch(`${ABI_API_BASE_URL}/user/${userId}`, { headers: { Authorization: `Bearer ${accessToken}` }})Next step
Section titled “Next step”Continue with authentication and sub-partner access or browse the API reference.
