Updated on 2023-12-22 GMT+08:00

Inviting a User

Description

This API is used to invite a user to join an enterprise using the mobile number or email address.

  • If the invited user does not exist in the Huawei Cloud Meeting system:
    • The user needs to register with Huawei Cloud Meeting to join the enterprise that uses the free or standard edition.
    • The user is directly added to the enterprise that uses the premium edition. The user receives the initial password of the Huawei Cloud Meeting account and needs to change the password when logging in to Huawei Cloud Meeting using the mobile number or email address.
  • If the invited user exists in the Huawei Cloud Meeting system, the user will receive an SMS message or email for confirmation. After accepting the invitation, the user is added to the enterprise. The password of the user account remains unchanged.

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

POST

Request Address

/v1/usg/dcs/corp/member/add

Transport Protocol

HTTPS

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Location

Description

X-Access-Token

Yes

String

Header

Authorization token. Use the value of accessToken in the response to the request for Authenticating an App ID.

X-Request-Id

No

String

Header

Request ID, which is used for fault tracing and locating. You are advised to use a UUID. If this parameter is not carried, a request ID is automatically generated.

Accept-Language

No

String

Header

Language. Values: zh-CN for Chinese (default) and en-US for English.

contact

Yes

String

Body

The background automatically identifies whether the mobile number or email address is used. If the mobile number is used, the mobile number must match the country/region code.

NOTE:
  • Enterprises at the Chinese mainland site can invite users by specifying email addresses or mobile numbers of the users. Only mobile numbers starting with +86 are supported.
  • Enterprises at the International site can invite users only by specifying email addresses of the users.

country

No

String

Body

Country or region that the mobile number belongs to.

Default value: chinaPR.

maxLength: 255

minLength: 0

deptCode

No

String

Body

Department code. If this parameter is not carried, the root department is used by default.

desc

No

String

Body

Remarks.

maxLength: 128

minLength: 0

name

Yes

String

Body

Name of the enterprise user.

sortLevel

No

Integer

Body

Sequence number in the corporate directory. A smaller value indicates a higher position in the corporate directory.

title

No

String

Body

Job title.

Status Codes

Table 3 Status codes

HTTP Status Code

Description

200

Operation successful.

400

Invalid parameters.

401

Authentication is not performed or fails.

403

Insufficient permissions.

500

Server exception.

Response Parameters

Table 4 Response Parameters

Parameter

Type

Description

userExist

Boolean

Whether the user exists.

Example Request

POST /v1/usg/dcs/corp/member/add
Connection: keep-alive
Content-Type: application/json
X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9
Content-Length: 173
Host: api.meeting.huaweicloud.com
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)

{
    "contact": "+8617379679094",
    "country": "chinaPR",
    "name": "Tom"
}

Example Response

HTTP/1.1 200 
Date: Wed, 18 Dec 2019 06:20:40 GMT
Content-Type: application/json;charset=UTF-8
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Server: api-gateway
X-Request-Id: ebbb9b1e50d1ec63b78d8484d170173f

{
    "userExist": false
}

Error Codes

If an error code starting with MMC or USG is returned when you use this API, rectify the fault by following the instructions provided in Huawei Cloud API Error Center.

Example cURL Command

curl -k -i -H 'content-type: application/json' -X POST -H 'X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9' -d '{"contact": "+8617379679094","country": "chinaPR","name": "Tom"}' https://api.meeting.huaweicloud.com/v1/usg/dcs/corp/member