GenerateUserAccessToken

Updated at:

Generates a token for passwordless logon of chat window users to pass the enterprise identity of the user.

Operation description

For security reasons, the generated token is valid only for the first use within the expiration period. If the same user logs on from multiple browsers, you must call this operation multiple times.

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

Yes

The reserved parameter. You do not need to specify this parameter.

1000

AgentKey

string

No

The key of the workspace. If you do not specify this parameter, the default workspace is accessed. You can obtain the key on the Business Management page of the Alibaba Cloud account.

ac627989eb4f8a98ed05fd098bbae5_p_beebot_public

ExtraInfo

string

No

The additional information in JSON string format.

{ "xx": 123, "yy": 22332, "customerNameCard": [ { "key": "Name", "value": "Zhang San" }, { "key": "Level", "value": "v2" }, { "key": "Contact information", "value": "123" } ] }

Email

string

No

The email address of the user. The value cannot exceed 128 characters in length.

zhangsan@example.com

Telephone

string

No

The phone number of the user. The value cannot exceed 30 characters in length.

1381111****

ForeignId

string

Yes

The external ID of the user.

8882022040000000171

Nick

string

Yes

The nickname of the visitor.

Zhang San

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

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

Success

boolean

Indicates whether the operation is successful. Valid values:

  • true: Yes.

  • false: No.

true

Code

string

The returned code.

200

Message

string

The error message.

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.