Manage AceDataCloud Platform Account Token

Account Token (formerly known as Platform Token) is a "account-level key" that developers use to programmatically manage AceDataCloud platform resources (service applications, API credentials, orders, call records, balances, files, etc.). Its function is similar to a user Token after frontend login, but it never expires and can only be deleted by you.

ℹ️ This interface belongs to the AceDataCloud Platform Management API, with a unified prefix of https://platform.acedata.cloud/api/v1/. For the complete interface index, see Get AceDataCloud Platform Document List.

Account Token vs API Credential

The two types of keys that beginners are most likely to confuse, please take a close look:

Dimension Account Token (this document) API Credential
Purpose Call management interfaces at https://platform.acedata.cloud/** Call business interfaces at https://api.acedata.cloud/** (OpenAI, Midjourney, Suno, Veo, etc.)
Format platform-v1- + 64-bit hexadecimal (total 76 characters) 32-bit hexadecimal
One account Usually 1–2 tokens 1–N tokens for each service application
Creation entry Account Token Console Create AceDataCloud Platform API Credential
Expiration conditions Only invalidated when you actively delete it Can set quota limits, expiration time, bind source IP

If you just want to call GPT-4.1, you need API Credential, not Account Token. If you want to write automation scripts to manage recharges, view monthly bills, or batch issue credentials to team members, then use Account Token.


One-click Creation in Console (Recommended)

  1. Log in to https://platform.acedata.cloud.
  2. Go to the sidebar → "Developer" → "Account Token".
  3. Click the "Create" button in the upper right corner to immediately obtain a platform-v1-... token, click the copy button to save it to your password manager.

Account Token Console

⚠️ The complete plaintext of the token is only returned once at creation. The list/detail interface still returns plaintext for historical reasons, but please do not rely on this behavior—it may change to only return the prefix in the future.


Create Account Token Using API

Interface Overview

Item Content
Method POST
URL https://platform.acedata.cloud/api/v1/platform-tokens/
Authentication ✅ Any existing Account Token or browser login JWT
Body application/json (can pass an empty object {})

Authentication Explanation (Chicken and Egg Problem)

How to get the first token? The answer is through the console—after logging in via the browser, the console uses JWT authentication to call POST /platform-tokens/ and sends you the first token. After that, you can use any existing platform-v1-... token to create more.

Request header format:

Authorization: Bearer platform-v1-92eb****629c
Content-Type: application/json

Request Example

curl -X POST 'https://platform.acedata.cloud/api/v1/platform-tokens/' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer platform-v1-92eb****629c' \
  -H 'content-type: application/json' \
  -d '{}'

Response (HTTP 201)

{
  "id": "3264f1aa-cbe1-4e2c-a434-95adba4f8304",
  "token": "platform-v1-e13afee8fd4f43938b1547b91189bbd955886bac29f2411f8da32cb327cd4901",
  "expiration": null,
  "user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
  "created_at": "2026-04-26T15:50:11.123456Z",
  "updated_at": "2026-04-26T15:50:11.123456Z",
  "used_at": null
}

Field Explanation

Field Type Description
id UUID Token primary key, used for deletion/query details
token string Account token plaintext. Format platform-v1- + 64-bit hexadecimal (total 76 characters)
expiration int null
user_id UUID User ID to which it belongs. Also the ?user_id= parameter value that must be passed in all subsequent list interfaces
created_at datetime (ISO8601) Creation time
updated_at datetime (ISO8601) Update time
used_at datetime null

Get Account Token List

Interface Overview

Item Content
Method GET
URL https://platform.acedata.cloud/api/v1/platform-tokens/
Authentication ✅ Requires Account Token

Required Query Parameters

⚠️ Must include ?user_id=<your_user_id>. Reason: The list interface performs permission checks on pagination results object by object, and if user_id is not included, the first object that does not belong to you will be rejected, returning 403 permission_denied.

How to get user_id:

  1. Open https://auth.acedata.cloud/user/profile in the browser, the complete UUID is displayed at the top of the page.
  2. Or directly fill in the user_id field from the return value of POST /platform-tokens/.

Query Parameters

Parameter Required Type Description
user_id UUID Current account's user ID
limit int Number of items per page, default 10, maximum 100
offset int Offset
ordering string Sorting field, default -created_at

Request Example

curl 'https://platform.acedata.cloud/api/v1/platform-tokens/?user_id=89518d07-5560-4b05-92c1-667f3ddf6a4b&limit=5' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer platform-v1-92eb****629c'

Response (HTTP 200)

{
  "count": 2,
  "items": [
    {
      "id": "51c575a2-801c-4211-bc47-711452a8c8c9",
      "token": "platform-v1-8f4202844be3460185ee26fb6838be5e7ece089d85b64dbca4ef309329f93faf",
      "expiration": null,
      "user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
      "created_at": "2026-04-26T15:41:32.761705Z",
      "updated_at": "2026-04-26T15:41:32.761726Z",
      "used_at": null
    }
  ]
}

ℹ️ The pagination response for the entire platform API is uniformly structured as count + items, not results. The appearance of results in the documentation is a remnant of DRF's default style and should be read as items.


Get Account Token Details

Item Content
Method GET
URL https://platform.acedata.cloud/api/v1/platform-tokens/<id>no trailing slash
Auth ✅ Only the token creator or super administrator can access
curl 'https://platform.acedata.cloud/api/v1/platform-tokens/51c575a2-801c-4211-bc47-711452a8c8c9' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer platform-v1-92eb****629c'

The return structure is consistent with the list elements, HTTP 200.


Delete Account Token

Item Content
Method DELETE
URL https://platform.acedata.cloud/api/v1/platform-tokens/<id>no trailing slash
Auth ✅ Only the token creator or super administrator can delete
curl -X DELETE 'https://platform.acedata.cloud/api/v1/platform-tokens/3264f1aa-cbe1-4e2c-a434-95adba4f8304' \
  -H 'authorization: Bearer platform-v1-92eb****629c'
  • Successfully returns HTTP 204 No Content, with no response body.
  • After deletion, the token immediately becomes invalid, and all services using it will immediately receive 401.
  • Querying the id again will return 404.

⚠️ Deletion is irreversible. If you suspect the token has been leaked, you can first create a new one, switch the business side, and then delete the old one—the platform has no limit on the number.


Unsupported Operations

Operation HTTP Description
PATCH Modify 405 No fields can be modified after the account token is created. For purposes like renaming, please delete and recreate.
PUT Replace 405 Same as above

Error Code Quick Reference

HTTP code Common Reasons
401 not_authenticated Missing Authorization header, or the token has been deleted
403 permission_denied List interface missing ?user_id=, or accessing someone else's token details
404 not_found id does not exist or has been deleted
405 method_not_allowed PATCH/PUT sent to the details interface

Error responses have a uniform format:

{
  "detail": "You do not have permission to perform this action.",
  "code": "permission_denied",
  "trace_id": "0a88956213edf6e62b71695ee2df0eff"
}

When troubleshooting, provide the trace_id to customer service or include it in the ticket to quickly locate the logs.


Complete Code Example

Python

import requests

BASE = "https://platform.acedata.cloud/api/v1"
PLATFORM_TOKEN = "platform-v1-92eb****629c"
USER_ID = "89518d07-5560-4b05-92c1-667f3ddf6a4b"

headers = {
    "accept": "application/json",
    "authorization": f"Bearer {PLATFORM_TOKEN}",
    "content-type": "application/json",
}

# 1. Create a new token
created = requests.post(f"{BASE}/platform-tokens/", headers=headers, json={}).json()
print("New token:", created["token"])
print("UserID:", created["user_id"])

# 2. List
listing = requests.get(
    f"{BASE}/platform-tokens/",
    headers=headers,
    params={"user_id": USER_ID, "limit": 50},
).json()
print(f"Total {listing['count']} tokens")

# 3. Delete (note no trailing slash)
resp = requests.delete(f"{BASE}/platform-tokens/{created['id']}", headers=headers)
assert resp.status_code == 204, resp.text

Node.js

const BASE = 'https://platform.acedata.cloud/api/v1'
const PLATFORM_TOKEN = 'platform-v1-92eb****629c'
const USER_ID = '89518d07-5560-4b05-92c1-667f3ddf6a4b'

const headers = {
  accept: 'application/json',
  authorization: `Bearer ${PLATFORM_TOKEN}`,
  'content-type': 'application/json',
}

// Create
const created = await fetch(`${BASE}/platform-tokens/`, {
  method: 'POST',
  headers,
  body: '{}',
}).then((r) => r.json())

// List
const url = new URL(`${BASE}/platform-tokens/`)
url.searchParams.set('user_id', USER_ID)
const listing = await fetch(url, { headers }).then((r) => r.json())
console.log(`Total ${listing.count} tokens`)

// Delete (no trailing slash)
await fetch(`${BASE}/platform-tokens/${created.id}`, { method: 'DELETE', headers })

Use in Other Platform APIs

Simply place platform-v1-... directly into the Authorization: Bearer ... header to call any platform interface that requires authentication:

curl 'https://platform.acedata.cloud/api/v1/applications/?user_id=89518d07-5560-4b05-92c1-667f3ddf6a4b' \
  -H 'authorization: Bearer platform-v1-92eb****629c'

The 32-bit hexadecimal API credentials used for business interfaces (OpenAI, Midjourney, Suno, Veo, etc.) at https://api.acedata.cloud/** are completely different. Please do not mix them—writing the account token to the business interface will result in 401, and vice versa.