Skip to main content

Obtain Third-party Authorization Information

POST 

/auth/v1/provider/token

Obtain authorization information for third-party services, such as via OAuth login, acquire authorized user information corresponding to the OAuth client to generate a provider_token, which is required for invoking the identity source login interface.

Request

Query Parameters

    client_id string

    The client ID corresponding to the application, which defaults to the environment ID and can be omitted

Header Parameters

    x-device-id stringrequired

    Device ID

Body

    provider_id Identity source ID, such as wx_open or Mini Program app ID (string)required
    provider_redirect_uri Identity source callback address (string)
    provider_code Login code obtained from a third-party system, used to exchange for user identity (string)

Responses

A successful response.

Response Headers
    Schema
      provider_token If auto-registration is not enabled, returns provider_token for further processing, e.g., via mobile number (string)
      expires_in int32
      provider_profile object
      provider_id Identity source ID (string)
      sub Primary ID, identifying unique user identifier (string)
      name Full name (string)
      picture Avatar (string)
      email Email (string)
      phone_number Mobile number (string)
      gender Gender (string)
      locale Region (string)
      url URL (string)
      groups string[]
      sub_id sub_id If SLO is required, sub_id may need to be returned. Reference: urn:oasis:names:tc:SAML:attribute:subject-id (string)
      token Token returned by provider, e.g., refresh_token in OAuth mode (string)
      at_hash at hash of provider profile (string)
      meta object
      object
      property name* string
      raw Raw information from third party (string)
      provider Identity source type (string)
    Loading...