GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
Development Integration
  • API

  • SDK

    • Java

    • Node.js

    • Python

      • Installation and Usage
      • Authentication Module

        • Login

          • Login with Account Password
          • Login with Username Password
          • Login with Phone Password
          • Login with Email Password
          • Login with Email Passcode
          • Login with Phone Passcode
          • Login with LDAP Account
          • Login with AD Account
          • Login with User Credentials
          • Login with Mobile Social Login
          • Get Alipay AuthInfo
          • Generate QR Code for Login
          • Check QR Code Status
          • Exchange TokenSet with QR Code Ticket
          • Custom APP QR Code Login: Change QR Code Status on APP Side
        • Logout

        • Register

        • User Profile

        • Account Binding

        • MFA Factor Management

        • User Related Resources

        • Message Service

        • WeChat Related APIs

        • Others

        • OIDC Module
        • OAuth Module
        • SAML Module
        • CAS Module
        • Events
      • Management Module

  • Error Codes
  1. Development Integration
  2. /
  3. SDK
  4. /
  5. Python
  6. /
  7. Authentication Module

  8. /
  9. Login

  10. /
  11. Login with Mobile Social Login

¶ Use mobile social login

Update time: 2025-07-23 07:34:21
Edit

This document is automatically generated based on https://github.com/authing/authing-docs-factory based on https://api-explorer.genauth.ai V3 API, and is consistent with API parameters and return results. If this document description is incorrect, please refer to V3 API.

This endpoint is a mobile social login interface, which uses the temporary credentials returned by the third-party mobile social login to log in and exchange the user's id_token and access_token. Please read the corresponding social login access process first.

Note: Depending on the application type you selected when creating the application in GenAuth and the exchange token authentication method configured in the application, different forms of client identity verification are required when calling this interface.

Click to expand details

You can find the Exchange token authentication method configuration item in Application - Self-built application - Application details - Application configuration - Other settings - Authorization configuration in the GenAuth console (opens new window):

Single-page web applications and client applications are hidden, and the default value is none, which is not allowed to be modified; backend applications and standard web applications can modify this configuration item.

¶ When the exchange token authentication method is none

No additional operations are required to call this interface.

¶ When the exchange token authentication method is client_secret_post

When calling this interface, the client_id and client_secret parameters must be passed in the body as conditions for verifying the client identity. Among them, client_id is the application ID, and client_secret is the application secret key.

¶ When exchanging token authentication mode is client_secret_basic

When calling this interface, the authorization request header must be carried in the HTTP request header as a condition for verifying the client's identity. The format of the authorization request header is as follows (where client_id is the application ID, and client_secret is the application secret key.):

Basic base64(<client_id>:<client_secret>)

Result example:

Basic NjA2M2ZiMmYzY3h4eHg2ZGY1NWYzOWViOjJmZTdjODdhODFmODY3eHh4eDAzMjRkZjEyZGFlZGM3

JS code example:

"Basic " + Buffer.from(client_id + ":" + client_secret).toString("base64");

¶ Method name

AuthenticationClient.sign_in_by_mobile

¶ Request Parameters

Nametype
Is this field required?
Default
Description
Sample
extIdpConnidentifierstringYes-External IdP identifierwework
connectionstringyes-Mobile social login type:
- apple: Apple mobile application
- wechat: WeChat mobile application
- alipay: Alipay mobile application
- wechatwork: Enterprise WeChat mobile application
- wechatwork_agency: Enterprise WeChat mobile application (agency development mode)
- lark_internal: Feishu mobile enterprise self-built application
- lark_public: Feishu mobile application store application
- lark_block: Feishu widget
- yidun: NetEase Yidun one-click login
- wechat_mini_program_code: WeChat mini program uses code login
- wechat_mini_program_phone: WeChat mini program uses mobile phone number login
- wechat_mini_program_code_and_phone: WeChat mini program uses code and mobile phone number to log in
- google: Google mobile social login
- facebook: Facebook mobile social login
- qq: QQ mobile social login
- weibo: Sina Weibo mobile social login
- baidu: Baidu mobile social login
- linkedin: LinkedIn mobile social login
- dingtalk: DingTalk mobile social login
- github: Github mobile social login
- gitee: Gitee mobile social login
- gitlab: GitLab mobile social login
- douyin: Douyin mobile social login
- kuaishou: Kuaishou mobile social login
- xiaomi: Xiaomi mobile social login
- line: LINE Mobile social login
- slack: Slack mobile social login
- oppo: OPPO mobile social login
- huawei: Huawei mobile social login
- amazon: Amazon mobile social login
wechat
wechatPayloadSignInByWechatPayloadDtoNo-Apple mobile social login data, required when connection is wechat.
applePayloadSignInByApplePayloadDtoNo-WeChat social login data, required when connection is apple.
alipayPayloadSignInByAlipayPayloadDtoNo-Alipay social login data, required when connection is alipay.
wechatworkPayloadSignInByWechatworkDtoNo-Enterprise WeChat social login data, required when connection is wechatwork.
wechatworkAgencyPayloadSignInByWechatworkAgencyPayloadDtoNo-WeChat for Enterprise (development agent mode) mobile social login data, required when connection is wechatwork_agency.
larkPublicPayloadSignInByLarkPublicPayloadDtoNo-Lark App Store mobile social login data, required when connection is lark_public.
larkInternalPayloadSignInByLarkInternalPayloadDtoNo-Social login data for mobile apps of Lark self-built applications. Required when connection is lark_internal.
larkBlockPayloadSignInByLarkBlockPayloadDtoNo-Social login data for mobile widgets of Lark. Required when connection is lark_block.
yidunPayloadSignInByYidunPayloadDtoNo-NetEase Yidun mobile social login data, required when connection is yidun.
wechatMiniProgramCodePayloadSignInByWechatMiniProgramCodePayloadDtoNo-WeChat Mini Program uses code to log in related data. It is required when connection is wechat_mini_program_code.
wechatMiniProgramPhonePayloadSignInByWechatMiniProgramPhonePayloadDtoNo-WeChat Mini Program uses mobile phone number to log in related data. It is required when connection is wechat_mini_program_phone.
wechatMiniProgramCodeAndPhonePayloadSignInByWechatMiniProgramCodeAndPhonePayloadDtoNo-WeChat Mini Program uses code and phone number to log in related data. Required when connection is wechat_mini_program_code_and_phone.
googlePayloadSignInByGooglePayloadDtoNo-Google mobile social login data, required when connection is google.
facebookPayloadSignInByFacebookPayloadDtoNo-Facebook mobile social login data, required when connection is facebook.
qqPayloadSignInByQQPayloadDtoNo-QQ mobile social login data, required when connection is qq.
weiboPayloadSignInByWeiboPayloadDtoNo-Sina Weibo mobile social login data, required when connection is weibo.
baiduPayloadSignInByBaiduPayloadDtoNo-Baidu mobile social login data, required when connection is baidu, and one of the attributes code and access_token of baiduPayload must be selected, and the code value is used first as the authorization login method.
linkedInPayloadSignInByLinkedInPayloadDtoNo-LinkedIn mobile social login data, required when connection is linkedin.
dingTalkPayloadSignInByDingTalkPayloadDtoNo-DingTalk mobile social login data, required when connection is dingtalk.
githubPayloadSignInByGithubPayloadDtoNo-Github mobile social login data, required when connection is github.
giteePayloadSignInByGiteePayloadDtoNo-Gitee mobile social login data, required when connection is gitee.
gitlabPayloadSignInByGitlabPayloadDtoNo-GitLab mobile social login data, required when connection is gitlab.
douyinPayloadSignInByDouyinPayloadDtoNo-Douyin mobile social login data, required when connection is douyin.
kuaishouPayloadSignInByKuaishouPayloadDtoNo-Kuaishou mobile social login data, required when connection is kuaishou.
xiaomiPayloadSignInByXiaomiPayloadDtoNo-Xiaomi mobile social login data, required when connection is xiaomi.
linePayloadSignInByLinePayloadDtoNo-LINE mobile social login data, required when connection is line.
slackPayloadSignInBySlackPayloadDtoNo-Slack mobile social login data, required when connection is slack.
oppoPayloadSignInByOPPOPayloadDtoNo-OPPO mobile social login data, required when connection is oppo.
huaweiPayloadSignInByHuaweiPayloadDtoNo-Huawei mobile social login data, required when connection is huawei.
amazonPayloadSignInByAmazonPayloadDtoNo-Amazon mobile social login data, required when connection is amazon.
optionsSignInByMobileOptionsDtoNo-Optional parameters
client_idstringNo-Application ID. Required when the "Exchange token authentication method" of the application is configured as client_secret_post.6342b8537axxxx047d314109
client_secretstringNo-Application secret key. Required when the "Exchange token authentication method" of the application is configured as client_secret_post.4203d30e5e915xxxxxx26c31c9adce68

¶ Request response

Type: LoginTokenRespDto

NameTypeDescription
statusCodenumberBusiness status code, which can be used to determine whether the operation is successful. 200 means success.
messagestringDescription
apiCodenumberSegmented error code, which can be used to get the specific error type (successful request does not return). For a detailed list of error codes, see: API Code List (opens new window)
requestIdstringRequest ID. Returned when the request fails.
dataLoginTokenResponseDataDtoResponse data

Sample result:

{
  "statusCode": 200,
  "message": "Success",
  "requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
  "data": {
    "scope": "openid profile",
    "access_token": "eyJhbGciOiJSxxxxx",
    "id_token": "eyJhbGxxxx",
    "refresh_token": "WPsGJbvpBjqXz6IJIr1UHKyrdVF",
    "token_type": "bearer",
    "expire_in": 7200
  }
}

¶ Data structure

¶ SignInByWechatPayloadDto

NameType
Is it required?
Description
Sample value
codestringNoOne-time temporary code returned by WeChat mobile social login1660291866076

¶ SignInByApplePayloadDto

NameType
Is it required?
Description
Sample value
codestringNoOne-time temporary code returned by social login on Apple mobile terminal1660291866076

¶ SignInByAlipayPayloadDto

NameType
Is it required
Description
Sample value
codestringNoOne-time temporary code returned by social login on Alipay mobile terminal1660291866076

¶ SignInByWechatworkDto

NameType
Is it required?
Description
Sample value
codestringNoOne-time temporary code returned by social login on WeChat mobile terminal1660291866076

¶ SignInByWechatworkAgencyPayloadDto

NameType
Is it required?
Description
Sample value
codestringNoOne-time temporary code returned by social login on mobile terminal of WeChat for Enterprise (development mode)1660291866076

¶ SignInByLarkPublicPayloadDto

NameType
Is it required
Description
Sample value
codestringNoOne-time temporary code returned by social login on mobile terminal of Feishu App Store1660291866076

¶ SignInByLarkInternalPayloadDto

NameType
Is it required?
Description
Sample value
codestringNoOne-time temporary code returned by social login of self-built mobile app of Feishu1660291866076

¶ SignInByLarkBlockPayloadDto

NameType
Is it required?
Description
Sample value
codestringNoOne-time temporary code returned by social login of Lark widget1660291866076

¶ SignInByYidunPayloadDto

NameType
Is it required?
Description
Sample value
tokenstringNoNetEase Yidun token1660291866076
accessTokenstringNoNetEase Yidun operator authorization code1660291866076

¶ SignInByWechatMiniProgramCodePayloadDto

NameType
Is it required?
Description
Sample value
encryptedDatastringNoGet the encrypted data (encryptedData) returned by WeChat open data
ivstringNoSymmetric decryption algorithm initial vector, returned by WeChat
codestringYesUser code returned by wx.login interface

¶ SignInByWechatMiniProgramPhonePayloadDto

NameType
Is it required
Description
Sample value
encryptedDatastringyesGet the encrypted data (encryptedData) returned by WeChat open data
ivstringyesSymmetric decryption algorithm initial vector, returned by WeChat
codestringyesUser code returned by wx.login interface

¶ SignInByWechatMiniProgramCodeAndPhonePayloadDto

NameType
Is it required
Description
Sample value
wxLoginInfoYesData related to WeChat Mini Program login using code, required Nested type: SignInByWechatMiniProgramCodePayloadDto.
wxPhoneInfoYesRequired, WeChat Mini Program user authorization to use mobile phone number to log in related data. If a new user registers to the user pool, the mobile phone number will be updated to the user information synchronously; if the user in the user pool already exists, if the user has not bound a mobile phone number and the mobile phone number authorized by the mini program has not been bound, the mobile phone number will be updated to the user information. Nested type: SignInByWechatMiniProgramPhoneInfoPayloadDto.

¶ SignInByWechatMiniProgramPhoneInfoPayloadDto

NameType
Is it required?
Description
Sample value
codestringYescode returned by the applet when getting the user's mobile phone number

¶ SignInByGooglePayloadDto

NameType
Is it required?
Description
Example value
codestringisthe code obtained by Google mobile social login

¶ SignInByFacebookPayloadDto

NameType
Is it required?
Description
Sample value
access_tokenstringYesAccess_token obtained by Facebook mobile social login

¶ SignInByQQPayloadDto

NameType
Is it required?
Description
Sample value
access_tokenstringYesQQ Access_token obtained by social login on mobile

¶ SignInByWeiboPayloadDto

NameType
Is it required?
Description
Sample value
access_tokenstringYesAccess_token obtained by social login on Sina Weibo mobile

¶ SignInByBaiduPayloadDto

NameType
Is it required?
Description
Sample value
codestringNoThe authorization code code obtained by Baidu mobile social login. Or the attribute access_token. If both are not empty, the authorization code code parameter is used first.
access_tokenstringNoThe authorization access credential access_token obtained by Baidu mobile social login. Or the attribute code. If both are not empty, the authorization code code parameter is used first.

¶ SignInByLinkedInPayloadDto

NameType
Is it required?
Description
Sample value
codestringYesThe code obtained by LinkedIn mobile social login

¶ SignInByDingTalkPayloadDto

NameType
Is it required?
Description
Sample value
codestringyesThe code obtained by social login on DingTalk mobile terminal
isSnsCodebooleannoIf the code obtained by social login on DingTalk mobile terminal needs to call the sns/getuserinfo_bycode interface to obtain the personal information of the authorized user, the parameter isSnsCode is passed true, otherwise code will be exchanged for accessToken to obtain the user information

¶ SignInByGithubPayloadDto

NameType
Is it required?
Description
Sample value
codestringYesAuthorization code code obtained by Github mobile social login

¶ SignInByGiteePayloadDto

NameType
Is it required?
Description
Sample value
codestringYesGitee Authorization code code obtained by social login on mobile

¶ SignInByGitlabPayloadDto

NameType
Is it required
Description
Sample value
codestringYesAuthorization code code obtained by social login on mobile GitLab

¶ SignInByDouyinPayloadDto

NameType
Is it required
Description
Sample value
codestringYesAuthorization code code obtained by social login on Douyin mobile terminal

¶ SignInByKuaishouPayloadDto

NameType
Is it required
Description
Sample value
codestringYesAuthorization code code obtained by social login on Kuaishou mobile terminal

¶ SignInByXiaomiPayloadDto

NameType
Is it required?
Description
Sample value
codestringYesAuthorization code code obtained by Xiaomi mobile social login

¶ SignInByLinePayloadDto

NameType
Is it required?
Description
Sample value
access_tokenstringYesaccess_token obtained by LINE mobile social login
id_tokenstringNoid_token obtained by LINE mobile social login, requires openid permission, will obtain user information based on id_token, otherwise obtain user information based on access_token

¶ SignInBySlackPayloadDto

NameType
Is it required?
Description
Sample value
codestringYesSlack mobile social login obtained authorization code code

¶ SignInByOPPOPayloadDto

NameType
Is it required?
Description
Sample value
codestringYesOPPO mobile social login obtained authorization code code

¶ SignInByHuaweiPayloadDto

NameType
Is it required?
Description
Sample value
codestringYesAuthorization code code obtained by Huawei mobile social login

¶ SignInByAmazonPayloadDto

NameType
Is it required?
Description
Sample value
access_tokenstringYesThe access token access_token obtained by Amazon mobile social login

¶ SignInByMobileOptionsDto

| Name | Type |

Required
|
Description
|
Sample value
| | ---------- | ------ | -------------------------------------- | ---------------------------- ...
- profile: Returns birthdate, family_name, gender, given_name, locale, middle_name, name, nickname, picture, preferred_username, profile, updated_at, website, zoneinfo fields.
- username: Returns username.
- email: Returns email, email_verified.
- phone: Returns phone_number, phone_number_verified.
- offline_access: If this parameter exists, the token interface will return the refresh_token field.
- roles: Returns the user's role list.
- external_id: The user's user ID in the original system.
- extended_fields: Returns the user's extended field information, the content is an object, the key is the extended field name, and the value is the extended field value.
- tenant_id: Returns the user's tenant ID.
| openid profile | | context | object | No | Additional request context that will be passed to the context object of the Pipeline (opens new window) before and after authentication. Learn how to get additional context passed in the context parameter of the Pipeline](https://docs.genauth.ai/guides/pipeline/context-object.html). | {"source":"utm"} | | tenantId | string | No | Tenant ID | 625783d629f2bd1f5ddddd98c | | customData | object | No | To set additional user custom data, you need to configure custom data (opens new window) in the GenAuth console first. | {"school":"pku","age":"20"} |

¶ LoginTokenResponseDataDto

NameType
Is it required?
Description
Sample value
scopestringNoScope corresponding to access_tokenopenid profile
access_tokenstringNoAPI call credentials, authorized to access resource API within a limited timeeyJhbGciOiJSxxxxx
id_tokenstringNoUser's identity credentials, which will contain user information after parsingeyJhbGxxxx
refresh_tokenstringNorefresh_token is used to obtain a new AccessTokenWPsGJbvpBjqXz6IJIr1UHKyrdVF
token_typestringyestoken typebearer
expire_innumberyesexpiration time in seconds7200
Previous article: Login with User Credentials Next article: Get Alipay AuthInfo
  • Method name
  • Request Parameters
  • Request response
  • Data structure

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.