---
title: "Grant Wechat Miniprogram Login"
method: POST
path: "/account/auth/wechat-miniprogram/grant"
tags: ["account"]
---

# Grant Wechat Miniprogram Login

`POST /account/auth/wechat-miniprogram/grant`

## Request

- Base URL: `https://api.beatra.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.beatra.ai/account/auth/wechat-miniprogram/grant`
- Auth: none declared

Exchange a mini-program js_code for a one-time web-view ticket. No session cookie.

## Request body

- WechatMiniProgramGrantRequest
  - `js_code` string, required
  - `locale` 'zh' | 'en', nullable

## Response `200`

Successful Response

- WechatMiniProgramGrantResponse
  - `ticket` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/beatra/apis/agent-service-api.md) · [All operations](https://skmtc.dev/beatra/apis/agent-service-api/llms.txt) · [OpenAPI document](https://skmtc.dev/beatra/apis/agent-service-api/revisions/58e440556498?raw)
