GenerateUserAccessToken

Updated at:

Generates a token for password-free login in the chat window. This token represents the user's enterprise identity.

Operation description

For security, each generated token is valid for a single use within its expiration period. If a user logs in from multiple browsers, you must call this operation to generate a separate token for each session.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ExpireTime

integer

No

A reserved parameter. You do not need to specify it.

1000

AgentKey

string

No

The key of the business space. If you do not specify this parameter, the default business space is used. You can obtain the key from the business management page of your main account.

ac627989eb4f8a98ed05fd098bbae5_p_beebot_public

ExtraInfo

string

No

The extra information, formatted as a JSON string.

{ "xx": 123, "yy": 22332, "customerNameCard": [ { "key": "姓名", "value": "张三" }, { "key": "等级", "value": "v2" }, { "key": "联系方式", "value": "123" } ] }

Email

string

No

The user's email address.

a***bcx@gmail.com

Telephone

string

No

The user's telephone number.

1381111****

ForeignId

string

Yes

The external user ID.

8882022040000000171

Nick

string

Yes

The user's nickname.

张三

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

E6988CE6-41CF-1103-9BEC-2B20D26C0B51

Success

boolean

Indicates whether the request succeeded.

true

Code

string

The return code.

200

Message

string

The error message for a failed request.

Parameter.Invalid

Data

string

The token value.

DDEXEDAFWAGASDFWAEFFAWEFAWFWEAFWAFWAEF

Examples

Success response

JSON format

{
  "RequestId": "E6988CE6-41CF-1103-9BEC-2B20D26C0B51",
  "Success": true,
  "Code": "200",
  "Message": "Parameter.Invalid",
  "Data": "DDEXEDAFWAGASDFWAEFFAWEFAWFWEAFWAFWAEF"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.