All Products
Search
Document Center

Resource Management:InviteAccountToResourceDirectory

Last Updated:Dec 18, 2023

Invites an account to join a resource directory.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TargetEntitystringYes

The ID or logon email address of the account that you want to invite.

someone@example.com
TargetTypestringYes

The type of the invited account. Valid values:

  • Account: indicates the ID of the account.
  • Email: indicates the logon email address of the account.
Email
NotestringNo

The description of the invitation.

The description can be up to 1,024 characters in length.

Welcome
Tagobject []No

The tags.

KeystringNo

The tag key.

k1
ValuestringNo

The tag value.

v1
ParentFolderIdstringNo

The ID of the parent folder.

r-b1****

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

9B34724D-54B0-4A51-B34D-4512372FE1BE
Handshakeobject

The information about the invitation.

Statusstring

The status of the invitation. Valid values:

  • Pending
  • Accepted
  • Cancelled
  • Declined
  • Expired
Pending
ExpireTimestring

The time when the invitation expires. The time is displayed in UTC.

2018-08-24T09:55:41Z
ResourceDirectoryIdstring

The ID of the resource directory.

rd-abcdef****
CreateTimestring

The time when the invitation was created. The time is displayed in UTC.

2018-08-10T09:55:41Z
Notestring

The description of the invitation.

Welcome
TargetEntitystring

The ID or logon email address of the invited account.

someone@example.com
MasterAccountIdstring

The ID of the management account of the resource directory.

172841235500****
MasterAccountNamestring

The name of the management account of the resource directory.

Alice
ModifyTimestring

The time when the invitation was modified. The time is displayed in UTC.

2018-08-10T09:55:41Z
TargetTypestring

The type of the invited account. Valid values:

  • Account: indicates the ID of the account.
  • Email: indicates the logon email address of the account.
Email
HandshakeIdstring

The ID of the invitation.

h-ycm4rp****

Examples

Sample success responses

JSONformat

{
  "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE",
  "Handshake": {
    "Status": "Pending",
    "ExpireTime": "2018-08-24T09:55:41Z",
    "ResourceDirectoryId": "rd-abcdef****",
    "CreateTime": "2018-08-10T09:55:41Z",
    "Note": "Welcome\n",
    "TargetEntity": "someone@example.com",
    "MasterAccountId": "172841235500****",
    "MasterAccountName": "Alice",
    "ModifyTime": "2018-08-10T09:55:41Z",
    "TargetType": "Email",
    "HandshakeId": "h-ycm4rp****"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter.TargetEntityYou must specify TargetEntity.-
400InvalidParameter.TargetEntityThe TargetEntity is invalid.-
400MissingParameter.TargetTypeYou must specify TargetType.-
400InvalidParameter.TargetTypeThe TargetType is invalid.-
400InvalidParameter.Note.LengthThe length of the invitation note exceeds the limit.-
400InvalidParameter.NoteThe Note is invalid.-
400InvalidParameter.ParentFolderIdThe ParentFolderId is invalid.The value of the ParentFolderId parameter is invalid. The value must start with r- followed by 6 characters or start with fd- followed by 10 characters. Valid characters include letters and digits.
400InvalidParameter.AccountIdThe AccountId is invalid.The value of the AccountId parameter is invalid. Specify a 16-digit ID.
404EntityNotExists.ResourceDirectoryThe resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.The account is not used to enable a resource directory. Use the account to enable a resource directory first.
404EntityNotExists.FolderThe resource directory folder does not exist.The specified folder does not exist. Create such a folder first.
409LimitExceeded.AccountThe maximum number of member accounts in a resource directory exceeds the limit.The number of members in the resource directory exceeds the upper limit.
409LimitExceeded.InvitationRateThe number of invitations sent exceeds the limit.-
409EntityAlreadyExists.HandshakeHandshakes with the same target entity already exist.-
409NotSupport.AccountInAnotherResourceDirectoryYour account is a management account for another resource directory or a member of another resource directory.-
409LegalEntityMismatchYour account does not have the same legal entity as the master account.-
409Invalid.AccountTypeThe specified profile type of account is invalid.The account type is invalid. Use an enterprise account.
409EntityAlreadyExists.ResourceDir.AccountThis resource directory account already exists.The email address that is generated by the system when the member is created already exists. Try again later.
409LimitExceeded.Invitation.InvalidTargetThe maximum number of invalid targets that can be invited by a single account is exceeded.The number of invalid accounts invited by the same account exceeds the upper limit.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-08The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    delete Error Codes: 400
    delete Error Codes: 404
2023-10-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    delete Error Codes: 400
    delete Error Codes: 404
2023-09-04The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    delete Error Codes: 400
    delete Error Codes: 404
2023-05-24The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 409 change
    delete Error Codes: 404
2023-04-28The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 404 change
    delete Error Codes: 409
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ParentFolderId