Skip to main content

Get List of Third-Party Identity Sources Bound to Account

GET 

/auth/v1/user/provider

API Description

Get list of third-party identity sources bound to current user, including bound and bindable identity source information

Input Requirements:

  • Authorization: Current logged-in user's access_token (required, passed in request header, format Bearer xxx)
  • client_id: Client ID corresponding to the application (optional, defaults to environment ID)
  • x-device-id: Device ID (optional, current logged-in device ID)

Prerequisites:

  • Need valid access_token
  • User must be logged in

Output:

  • Returns list of identity sources bound to user (v1ProvidersResponse)
  • Includes identity source identifier, name, homepage, avatar, binding status and other information

Get Bound Identity Sources Request Example

GET /auth/v1/user/provider
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsInN1YiI6Ijk4NzY1NDMyMTAxMjM0NTY3ODkiLCJhdWQiOiJkZW1vLWFwcC0yZjhhOWMzZTFiNGQiLCJleHAiOjE3MzQ2NzU4ODksImlhdCI6MTczNDY2ODY4OSwic2NvcGUiOiJ1c2VyIn0.dGhpc19pc19hX2Zha2Vfc2lnbmF0dXJlX2Zvcl9leGFtcGxlX3B1cnBvc2VzX29ubHlfZG9fbm90X3VzZV9pbl9wcm9kdWN0aW9uX2Vudmlyb25tZW50X3RoaXNfaXNfbm90X3JlYWxfdG9rZW5fZGF0YQ
x-device-id: device_123456

Get Bound Identity Sources Response Example

{
"total": 2,
"data": [
{
"id": "github",
"name": "GitHub",
"homepage": "https://github.com",
"picture": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"provider_user_name": "zhangsan",
"provider_type": "oauth",
"bind": true
},
{
"id": "wechat",
"name": "WeChat",
"homepage": "https://open.weixin.qq.com",
"picture": "https://res.wx.qq.com/a/wx_fed/assets/res/NTI4MWU5.ico",
"provider_user_name": "",
"provider_type": "oauth",
"bind": false
},
{
"id": "google",
"name": "Google",
"homepage": "https://accounts.google.com",
"picture": "https://www.google.com/favicon.ico",
"provider_user_name": "",
"provider_type": "oauth",
"bind": false
}
]
}

Usage Scenarios:

  • User views bound third-party login methods
  • Display bindable identity sources in account settings page
  • Check which login methods user has bound
  • Provide unbinding operation entry

Key Characteristics:

  • Returns all available identity sources, including bound and unbindable
  • bind field indicates whether already bound
  • provider_user_name shows username on third-party platform (only for bound identity sources)
  • Supports multiple identity source types (OAuth, OIDC, SAML, etc.)

Request

Query Parameters

    client_id string

    Client ID corresponding to the application, can be obtained from Cloud Development Platform -> Identity Authentication -> Development Settings. Defaults to environment ID, can be omitted

Header Parameters

    x-device-id string

    Device ID, the ID of the current logged-in device. The client should generate it randomly and cache it on the client. This parameter is related to the number of logged-in accounts.

    Authorization stringrequired

    The access_token of the current logged-in user, format is Bearer xxx

    Example: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsInN1YiI6Ijk4NzY1NDMyMTAxMjM0NTY3ODkiLCJhdWQiOiJkZW1vLWFwcC0yZjhhOWMzZTFiNGQiLCJleHAiOjE3MzQ2NzU4ODksImlhdCI6MTczNDY2ODY4OSwic2NvcGUiOiJ1c2VyIn0.dGhpc19pc19hX2Zha2Vfc2lnbmF0dXJlX2Zvcl9leGFtcGxlX3B1cnBvc2VzX29ubHlfZG9fbm90X3VzZV9pbl9wcm9kdWN0aW9uX2Vudmlyb25tZW50X3RoaXNfaXNfbm90X3JlYWxfdG9rZW5fZGF0YQ

Body

    any

Responses

A successful response.

Response Headers
    Schema
      total int32

      Total count

      data object[]

      Linked identity provider data

    • Array [
    • id string

      Identity provider identifier

      name string

      Identity provider name

      homepage string

      Identity provider homepage

      picture string

      Identity provider avatar

      provider_user_name string

      Identity provider username

      provider_type string

      Identity provider type

      bind boolean

      Is it bound

    • ]
    Loading...