Authorization Endpoint
Initiates the OAuth 2.0 Authorization Code flow. Open this URL in a WebView — the user will be directed to the Tencent eSign authorization page to log in, select a Space, and grant authorization.
After the user clicks Agree, the server redirects to your redirect_uri with an authorization code. Pass this code to POST /openapi/v1/oauth/token to obtain tokens.
Two modes:
- Open Mode (default): Do not pass space_id. The user selects their own Space on the authorization page. If login_hint is an unregistered email, the system silently registers a new account.
- Designated Space Mode: Pass both space_id and login_hint. The target Space is locked server-side; the user cannot switch Spaces. The user must have been pre-added via POST /openapi/v1/members/add before initiating authorization — otherwise the authorization will be rejected with access_denied.
PKCE is required (code_challenge_method=S256). Plain is not supported.
Request Parameters
Response Parameters
Redirects to the authorization page. After the user completes authorization, redirects back to redirect_uri.
Authorization granted:
{redirect_uri}?code=AUTH_CODE&state=ECHOED_STATEThe code is valid for 10 minutes and can only be used once. Pass it to POST /openapi/v1/oauth/token immediately.
User cancelled or authorization denied:
{redirect_uri}?error=access_denied&state=ECHOED_STATEOther errors (e.g. invalid client_id, mismatched redirect_uri):
{redirect_uri}?error=invalid_request&error_description=...&state=ECHOED_STATE