Invites an account to join a resource directory.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TargetEntity | string | Yes | The ID or logon email address of the account that you want to invite. | someone@example.com |
TargetType | string | Yes | The type of the invited account. Valid values:
| |
Note | string | No | The description of the invitation. The description can be up to 1,024 characters in length. | Welcome |
Tag | object [] | No | The tags. | |
Key | string | No | The tag key. | k1 |
Value | string | No | The tag value. | v1 |
ParentFolderId | string | No | The ID of the parent folder. | r-b1**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.TargetEntity | You must specify TargetEntity. | - |
400 | InvalidParameter.TargetEntity | The TargetEntity is invalid. | - |
400 | MissingParameter.TargetType | You must specify TargetType. | - |
400 | InvalidParameter.TargetType | The TargetType is invalid. | - |
400 | InvalidParameter.Note.Length | The length of the invitation note exceeds the limit. | - |
400 | InvalidParameter.Note | The Note is invalid. | - |
400 | InvalidParameter.ParentFolderId | The 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. |
400 | InvalidParameter.AccountId | The AccountId is invalid. | The value of the AccountId parameter is invalid. Specify a 16-digit ID. |
404 | EntityNotExists.ResourceDirectory | The 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. |
404 | EntityNotExists.Folder | The resource directory folder does not exist. | The specified folder does not exist. Create such a folder first. |
409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | The number of members in the resource directory exceeds the upper limit. |
409 | LimitExceeded.InvitationRate | The number of invitations sent exceeds the limit. | - |
409 | EntityAlreadyExists.Handshake | Handshakes with the same target entity already exist. | - |
409 | NotSupport.AccountInAnotherResourceDirectory | Your account is a management account for another resource directory or a member of another resource directory. | - |
409 | LegalEntityMismatch | Your account does not have the same legal entity as the master account. | - |
409 | Invalid.AccountType | The specified profile type of account is invalid. | The account type is invalid. Use an enterprise account. |
409 | EntityAlreadyExists.ResourceDir.Account | This resource directory account already exists. | The email address that is generated by the system when the member is created already exists. Try again later. |
409 | LimitExceeded.Invitation.InvalidTarget | The 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 time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-12-08 | The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-10-25 | The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-09-04 | The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-05-24 | The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-04-28 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||
|