All Products
Search
Document Center

Drive and Photo Service:LinkAccount

Last Updated:May 27, 2026

Links an account.

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 syntax

POST /v2/account/link HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

body

object

No

Request body parameters.

user_id

string

Yes

User ID to attach.

xxx

type

string

Yes

Account type.

  • mobile: mobile phone number

  • email: email address

  • ding: DingTalk

  • ram: Alibaba Cloud RAM sub-account

  • wechat: WeCom

  • ldap: LDAP account

  • custom: custom account

ding

identity

string

Yes

Unique identifier for the account, such as a mobile phone number.

eyy***

extra

string

No

Additional information for the unique identifier. For example, if the account uses a mobile phone number, this field contains the region code. The default value is 86 for the Chinese mainland.

86

Response elements

Element

Type

Description

Example

Token

Returns the user's authorization token information.

Examples

Success response

JSON format

{
  "access_token": "",
  "refresh_token": "",
  "expires_in": 0,
  "token_type": "",
  "user_id": "",
  "user_name": "",
  "avatar": "",
  "nick_name": "",
  "default_drive_id": "",
  "role": "",
  "status": "",
  "expire_time": "",
  "is_first_login": true,
  "device_id": "",
  "device_name": "",
  "domain_id": "",
  "default_sbox_drive_id": "",
  "user_data": {
    "key": ""
  },
  "pin_setup": true,
  "need_rp_verify": true,
  "state": "",
  "exist_link": [
    {
      "type": "",
      "identity": "",
      "extra": ""
    }
  ],
  "need_link": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.