---
title: "Wechat Js Sdk Config"
method: POST
path: "/account/wechat/js-sdk"
tags: ["account"]
---

# Wechat Js Sdk Config

`POST /account/wechat/js-sdk`

## 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/wechat/js-sdk`
- Auth: none declared

Public. The 公众号 signature for one H5 address, so WeChat's ··· card shows that page.

Only h5.beatra.cn (the 公众号's JS接口安全域名) is signed, only for the page
itself, a few times a minute per visitor. When the gateway cannot sign (no
公众号 setup, WeChat refusing) the answer is `enabled: false` and the page
keeps WeChat's own card: a missing card is not a server error.

## Request body

- WechatJsSdkConfigRequest
  - `url` string, required

## Response `200`

Successful Response

- WechatJsSdkConfigResponse: What `wx.config` needs for one address, or `enabled: false`. The ticket stays in cn_gateway.
  - `enabled` boolean, required
  - `app_id` string, nullable
  - `timestamp` integer, nullable
  - `nonce_str` string, nullable
  - `signature` string, nullable

## 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)
