Hive Axyl Server API reference
The Hive Axyl Server API is a server-to-server RESTful API that the app server uses to call the Hive Axyl server directly. Use it for processing that could be forged or tampered with if it went through the app client, such as receipt verification and login token checks, and for processing that only the app server can request, such as sending push notifications. This reference describes how to call each product's APIs, the request and response formats, and the error codes.
Before calling
To call the Hive Axyl Server API, you need the following values.
| Value | Purpose | Where to check |
|---|---|---|
| App ID | Specifies the target app. Most APIs take it in the X-App-Id header of the request; remote push sending takes it in appIds in the request body. | Project Settings > App ID. For details, see App ID. |
| Client ID, Client Secret | Used to issue an authentication token for the app server. | Project Settings > Security Key. For details, see Security key. |
| Authentication token | Put it in the Authorization header of the request to prove the caller's identity. | Issue it with Issue a token. |
The token to put in the Authorization header differs by API. To find out which token to use, see Which token to use.
For Mailbox API authentication and request headers, see Before calling the Mailbox API.
Base URL
The base URL differs by product. The Payment API provides a sandbox environment.
| Product | Production | Other environments |
|---|---|---|
| Authentication token, account and authentication | https://core-api.hiveaxyl.com | - |
| Payment | https://commerce-api.hiveaxyl.com | Sandbox https://sandbox-commerce-api.hiveaxyl.com |
| Push notifications | https://app-api.hiveaxyl.com | - |
| Mailbox | https://app-api.hiveaxyl.com | - |
API list
| Product | API | Description |
|---|---|---|
| Authentication token | Issue a token | Issues an authentication token for the app server. |
| Authentication token | Check access token validity | Checks whether a user's access token received from the app client is valid. |
| Account and authentication | Issue a pre-authorization key | Issues a grant key that approves account creation and custom account login and linking in advance. |
| Account and authentication | Change the username password | Changes the login password of a username account. |
| Payment | Verify consumable product receipts | Verifies the payment receipt of a consumable product with the market. |
| Payment | Verify subscription product receipts | Verifies the payment receipt of a subscription product with the market. |
| Payment | Get purchase history | Retrieves the purchase history for each payment provider. |
| Push notifications | Send remote push notifications | Immediately sends push notifications to the specified users. |
| Mailbox | Mailbox API | Sends mail and retrieves or manages sent and received mail. |
Responses and errors
On success, every API returns a JSON body made up of data and meta; on failure, it returns an error body that contains the error type and cause. For the response body structure and the error codes of each product, see Hive Axyl Server API error handling.