Get token
Obtain an access token using this site’s Access Key and Secret Key. client_id is the Access Key and client_secret is the Secret Key.
Use the returned data.accessToken as Authorization: Bearer <accessToken> when calling business endpoints. See Quickstart for the full flow.
POST https://api.hitem3d.ai/open-api/v1/auth/token
| Header | Value |
|---|---|
| Authorization | Basic base64(client_id:client_secret) |
| Content-Type | application/json |
Request body
No business request body is required. Credentials are supplied in the Authorization header.
Response body
| Field | Type | Description |
|---|---|---|
code | int | Response code. |
data.accessToken | String | Access token for subsequent API calls |
data.tokenType | String | Bearer |
data.nonce | String | Nonce |
msg | String | Message field; current examples also use message |
Request example
bash
curl --request POST 'https://api.hitem3d.ai/open-api/v1/auth/token' \
--user "$HI3D_ACCESS_KEY:$HI3D_SECRET_KEY" \
--header 'Content-Type: application/json'python
import os
import requests
response = requests.post(
"https://api.hitem3d.ai/open-api/v1/auth/token",
auth=(os.environ["HI3D_ACCESS_KEY"], os.environ["HI3D_SECRET_KEY"]),
headers={"Content-Type": "application/json"},
)
response.raise_for_status()
print(response.json())Response example
json
{
"code": 200,
"message": "success",
"data": {
"accessToken": "<TOKEN>",
"tokenType": "Bearer",
"nonce": "<NONCE>"
}
}API key management
Create credentials on the API keys page, with up to 10 keys per account. Save the Secret Key at creation; it is not shown again. Keys can be renamed, enabled or disabled. Disable a key before deletion. Deletion is irreversible and invalidates dependent calls immediately.
Error codes
| code | message | Description |
|---|---|---|
| 40010000 | client credentials are invalid | Invalid client_id or client_secret |
| 10000000 | system error | Internal server error |
API support:apicontact@hi3d.ai