Skip to main content

Get One-Time Login Code

Important Note

This feature is available in the Business plan. If you haven't upgraded yet, please upgrade before using this feature.

API Overview

  • Function: Create a temporary verification code for third-party registered users, used for Unified Entry - redirection with third-party login state
  • Request Method: POST
  • Request URL: /api/sso/code?appid={appid}&access_token={access_token}

Request Parameters

Parameter NameTypeLocationDescriptionExample
user_idinteger(uint64)bodySurvey system user ID
From Register Third-Party User API
60000208205
scene_typestringbodyScene type. If the user doesn't need to edit surveys in the backend, please preferably use respondent

respondent: Login as survey respondent
user: Login as survey editor
respondent

Response Parameters

Parameter NameTypeDescriptionExample
codestringOne-time login code, valid for 1 minuteDYWmmFerxtDefmd65n2ehUeRRPP0DCVB

Request Example

{
"user_id":60000208205,
"scene_type":"respondent"
}

Response Example

{
"code": "OK",
"error": {
"type": ""
},
"data": {
"code": "DYWmmFerxtDefmd65n2ehUeRRPP0DCVB"
},
"request_id": "d84e884b-3bc5-419d-9cc0-d6d6d14e68b6"
}

Error Codes

error.type CodeDescription
user_not_foundUser Not Found