# Create a TikTok Shop authorization URL

- API version: 1.11.0
- Last updated: 2026-11-16
- Server: `https://api.ailingtu.com`
- Web document: [Create a TikTok Shop authorization URL](/en/openapi/authorize-creator)
- Full schema: [JSON Schema](/en/openapi/operations/createTikTokShopAuthorizationUrl.json)
- Discovery: [Operation index](/en/openapi/operations/index.json)

## GET /v1/creatorAccount/tiktokShopOauth/authorize

Operation ID: `createTikTokShopAuthorizationUrl`

Create a TikTok Shop creator authorization URL for a market and shop type. Open the returned url in a browser or render it as a QR code for the creator.

Authentication: Request header `x-api-key: <YOUR_API_KEY>`; keep the key on the server and never expose it in client code, logs or shared files.

Success criteria: HTTP 2xx with code=0; for asynchronous tasks, also query the final status.

### Request parameters

| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| `oauthRegion` | query | us_cross \| us_local \| br_local \| br_cross \| mx_local \| mx_cross \| gb_local \| de_local \| de_cross \| fr_local \| fr_cross \| es_local \| es_cross \| it_local \| it_cross \| ie_local \| ie_cross \| jp_local \| jp_cross \| th_local \| th_cross \| my_local \| my_cross \| id_local \| id_cross \| sg_local \| sg_cross \| vn_local \| vn_cross \| ph_local \| ph_cross | Yes | Authorization market and shop type; _local means local shop and _cross means cross-border shop |

### Success response

```json
{
  "code": 0,
  "data": {
    "url": "https://services.tiktokshop.com/open/authorize?service_id=example&state=example"
  },
  "message": "success"
}
```

### Response fields

Main levels are listed below. The endpoint JSON Schema is authoritative for the full structure, unions and validation rules; Required refers to the containing object.

| Field | Type | Required | Description |
|---|---|---|---|
| `code` | integer | Yes | Fixed value: 0 |
| `message` | string | No | — |
| `data` | object | Yes | — |
| `data.url` | string | Yes | TikTok Shop OAuth authorization URL. |
| `timestamp` | integer | No | Response timestamp in milliseconds. |

### Integration notes and limits

- Use us_cross for US cross-border shops and us_local for US local or ACCU shops.
- UK cross-border authorization is no longer available; use gb_local only.
- Request the URL from your server with the API key; never expose the API key in browser code.
- The authorized entity is a TikTok account with commerce permission. After confirming, the page must redirect to the callback URL (for example https://app.ailingtu.com/oauth/tiktokshop); open it in a browser or inside the TikTok app and confirm it shows “SUCCESS/成功”.
- One QR code or authorization URL binds a single account; generate a separate one for each creator account.

### Error handling

| HTTP | Description |
|---|---|
| 400 | The request parameters or body are invalid. Fix them and retry. |
| 401 | The API key is missing or invalid. Check x-api-key. |
| 403 | The API key has no permission to call this endpoint. |
| 429 | Too many requests. Retry with exponential backoff. |
| 500 | The server failed. Retry transient failures with exponential backoff. |

Treat any non-zero business code as a failure. Do not blindly retry parameter, permission or authorization errors. If creating a publishing or generation task times out, query the existing task first instead of creating another one.
