WeChat Open Platform — Mobile App Login (OAuth 2.0)

OAuth 2.0 authorization flow exposed by the WeChat Open Platform for native iOS, Android, and HarmonyOS apps. Apps redirect into WeChat to obtain an authorization code, then exchange it via `https://api.weixin.qq.com/sns/oauth2/access_token` for an access token (snsapi_userinfo scope), refresh tokens via `/sns/oauth2/refresh_token`, and fetch profile via `/sns/userinfo`. Access tokens expire in 7200 seconds; refresh tokens last 180 days. Underpins "Login with WeChat" across third-party mobile apps.

WeChat Open Platform — Mobile App Login (OAuth 2.0) is one of 13 APIs that WeChat publishes on the APIs.io network.

Tagged areas include Identity, OAuth, Login, Mobile, and Open Platform. The published artifact set on APIs.io includes API documentation and an API reference.

API entry from apis.yml

apis.yml Raw ↑
aid: wechat:wechat-open-platform-mobile-login
name: WeChat Open Platform — Mobile App Login (OAuth 2.0)
description: OAuth 2.0 authorization flow exposed by the WeChat Open Platform for native iOS, Android,
  and HarmonyOS apps. Apps redirect into WeChat to obtain an authorization code, then exchange it via
  `https://api.weixin.qq.com/sns/oauth2/access_token` for an access token (snsapi_userinfo scope), refresh
  tokens via `/sns/oauth2/refresh_token`, and fetch profile via `/sns/userinfo`. Access tokens expire
  in 7200 seconds; refresh tokens last 180 days. Underpins "Login with WeChat" across third-party mobile
  apps.
humanURL: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Development_Guide.html
baseURL: https://api.weixin.qq.com
tags:
- Identity
- OAuth
- Login
- Mobile
- Open Platform
properties:
- url: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Development_Guide.html
  type: Documentation
- url: https://open.weixin.qq.com/
  type: Portal
- url: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Authorized_Interface_Calling_UnionID.html
  type: APIReference