---
title: "Create storefront token"
method: POST
path: "/storefront_tokens"
tags: ["Storefront Tokens"]
---

# Create storefront token

`POST /storefront_tokens`

Create storefront token<br>創建一個新的店面令牌

## Request body

- object
  - `backend_token` boolean — Indicate if it is a backend token for different setup such as ratelimit

## Response `201`

Created<br>成功創建

- StorefrontToken — The merchant that this storefront token can access
  - `id` string — Token ID<br>令牌ID
  - `token` string — A JWT storefront token string<br>JWT店面令牌字串
  - `staff_id` string — ID of the staff that created this token<br>創建這令牌的staff ID
  - `application_id` string — ID of the application that created this token<br>創建這令牌的程式
  - `merchant` StorefrontTokenMerchant — The merchant that this storefront token can access<br>這令牌能存取的商户
    - `id` string — Merchant ID<br>商户ID
    - `name` string — Merchant name<br>商户名稱
    - `email` string — Merchant email<br>商户電郵
    - `handle` string — Merchant handle<br>商户handle
  - `staff` StorefrontTokenMerchant — The merchant that this storefront token can access<br>這令牌能存取的商户
    - `id` string — Merchant ID<br>商户ID
    - `name` string — Merchant name<br>商户名稱
    - `email` string — Merchant email<br>商户電郵
    - `handle` string — Merchant handle<br>商户handle
  - `backend_token` boolean — Indicate if it is a backend token for different setup such as ratelimit
  - `created_at` string — The date and time when the token was created<br>令牌創建的日期和時間

## Other responses

- `400` — Limit exceeded<br>超出上限
- `422` — Validation error<br>驗證錯誤

---

[API](https://skmtc.net/shoplineapp/apis/shopline-open-api.md) · [All operations](https://skmtc.net/shoplineapp/apis/shopline-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shoplineapp/shopline-open-api/revisions/1675ac12cde7/schema)
