Performing Authentication
Description
This API is used to authenticate Huawei Cloud Meeting account and password. After the authentication is successful, an access token is generated.
- When clientType is set to 72, up to 64 tokens can be created for each account. If 64 tokens have been created using an account and the tokens are valid, creating a new token using the same account will invalidate the earliest token among the first 64 tokens.
- When clientType is not set to 72, only one token can be created for each account.
- A token is valid for 12 to 24 hours.
Debugging
You can debug this API in API Explorer.
Prototype
Request Method |
POST |
---|---|
Request Address |
/v1/usg/acs/auth/account |
Transport Protocol |
HTTPS |
Request Parameters
Parameter |
Mandatory |
Type |
Location |
Description |
---|---|---|---|---|
Authorization |
Yes |
String |
Header |
Authorization information, which carries the user account and password. The account and password need to be transcoded using Base64.
Basic Base64(username:password)
Basic eWMyOjE5OTUwwWWM=
NOTE:
The password contains 8 to 32 characters. |
Content-Type |
Yes |
String |
Header |
Media format of the body.
|
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. |
HA2 |
No |
String |
Body |
Verification code information, which is returned by the server in verification code scenarios. |
account |
Yes |
String |
Body |
User account (Huawei Cloud Meeting account).
Apply for an account in advance. For details, see Development Process.
NOTE:
|
clientType |
Yes |
Integer |
Body |
Type of the login client.
|
createTokenType |
No |
Integer |
Body |
Whether to generate a token. The default value is 0.
|
Status Codes
HTTP Status Code |
Description |
---|---|
200 |
Operation successful. |
400 |
Invalid parameters. |
401 |
Access denied. |
412 |
The account has been disabled. |
423 |
The account has been locked. |
500 |
Server exception. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
accessToken |
String |
Access token. |
clientType |
Integer |
Type of the account used for login.
|
createTime |
Long |
Timestamp when the access token was created, in milliseconds. |
daysPwdAvailable |
Integer |
Password validity period. |
expireTime |
Long |
Timestamp when the access token expires, in seconds. |
firstLogin |
Boolean |
Whether the login is the first login.
NOTE:
If you log in to the system for the first time, the system prompts you to change the initial password. Default value: false. |
proxyToken |
ProxyTokenDTO object |
Proxy authentication information. |
pwdExpired |
Boolean |
Whether the password has expired. Default value: false. |
refreshCreateTime |
Long |
Timestamp when a refresh token was created, in milliseconds. |
refreshExpireTime |
Long |
Timestamp when the refresh token expires, in seconds. |
refreshToken |
String |
Refresh token. |
refreshValidPeriod |
Long |
Validity period of the refresh token, in seconds. |
tokenIp |
String |
IP address of the login user. |
tokenType |
Integer |
Token type.
|
user |
UserInfo object |
User authentication details. |
validPeriod |
Long |
Validity period of the access token, in seconds. |
forceLoginInd |
Integer |
Whether preemptive login is enabled.
|
delayDelete |
Boolean |
Whether the token deletion is delayed. |
Parameter |
Type |
Description |
---|---|---|
accessToken |
String |
Short token of the proxy server, a string. |
enableRerouting |
Boolean |
Whether to enable secondary route. |
longAccessToken |
String |
Long token of the proxy server, a string. |
middleEndInnerUrl |
String |
Internal network address of the middle end. |
middleEndUrl |
String |
URL of the middle end. |
validPeriod |
Long |
Validity period of the token, in seconds. |
Parameter |
Type |
Description |
---|---|---|
adminType |
Integer |
Administrator type.
|
appId |
String |
App ID. |
cloudUserId |
String |
Huawei Cloud account ID. |
companyDomain |
String |
Enterprise domain name. |
companyId |
String |
ID of the enterprise to which the user belongs. |
corpType |
Integer |
Huawei Cloud Meeting service package edition.
|
freeUser |
Boolean |
Whether the login user is a free trial user. |
grayUser |
Boolean |
Whether the login user is a gray user. |
headPictureUrl |
String |
Profile picture link. |
isBindPhone |
Boolean |
Whether a mobile number is bound to the account. |
name |
String |
Username. |
nameEn |
String |
English name of the user. |
numberHA1 |
String |
HA1 corresponding to the SIP number. |
alias1 |
String |
Alias of the user. |
paidAccount |
String |
Paid terminal access account, which is used to log in to a smart TV. |
paidPassword |
String |
Password of the paid terminal access account, which is used to log in to a smart TV. |
password |
String |
Password of a free terminal access account, which is used to log in to a smart TV. |
realm |
String |
Local authentication. |
serviceAccount |
String |
SIP number associated with the user. |
spId |
String |
ID of the SP that manages the enterprise to which the user belongs. |
status |
Integer |
User status.
|
thirdAccount |
String |
Third-party user account. |
tr069Account |
String |
TR069 account. |
ucloginAccount |
String |
Huawei Cloud Meeting account. |
userId |
String |
UUID of a user. |
userType |
Integer |
User type.
|
visionAccount |
String |
Smart TV ID. |
weLinkUser |
Boolean |
Whether the user is a WeLink user. |
Example Request
POST /v1/usg/acs/auth/account Connection: keep-alive Authorization: Basic dGVzdDp0ZXN0 Content-Type: application/json Content-Length: 94 Host: api.meeting.huaweicloud.com User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191) { "account": "zhangsan@huawei.com", "clientType": 72, "createTokenType": 0 }
Example Response
HTTP/1.1 200 OK Date: Tue, 17 Dec 2019 09:32:47 GMT Content-Type: application/json;charset=UTF-8 Content-Length: 591 Connection: keep-alive X-Request-Id: f90fbd8714328398fcbedddde0f1303c { "accessToken": "cnr1810Ukd9iiytRVdcrK3LiSj0KrGHl6IbtGIgz", "clientType": 72, "createTime": 1663576164818, "daysPwdAvailable": -18172, "delayDelete": false, "expireTime": 1663657182, "firstLogin": true, "forceLoginInd": null, "proxyToken": null, "pwdExpired": false, "refreshCreateTime": 1663576164818, "refreshExpireTime": 1666168164, "refreshToken": "cnr1810GCy8II2HIuNitisGTsl7FELztZ3PvQf9D", "refreshValidPeriod": 2592000, "tokenIp": "10.8.0.90", "tokenType": 0, "user": { "adminType": 2, "alias1": null, "appId": null, "cloudUserId": null, "companyDomain": null, "companyId": "972897387", "corpType": 0, "freeUser": false, "grayUser": false, "headPictureUrl": null, "isBindPhone": null, "name": "xxxx_name", "nameEn": null, "numberHA1": "1ead5e5ce44849bc2718d5c....", "paidAccount": null, "paidPassword": null, "password": null, "realm": "huaweicloud.com", "serviceAccount": "sip:+99111217192335617@huaweicloud.com", "spId": "666bd8558e4646e1a7e1a0c99cf898e8", "status": 0, "thirdAccount": "zhangsan@huawei.com", "tr069Account": "", "ucloginAccount": "zhangsan@huawei.com", "userId": "d2bee87b30544ee68562912fb08b1074", "userType": 2, "visionAccount": null, "weLinkUser": false }, "validPeriod": 84616 }
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 'Authorization:Basic dGVzdDp0ZXN0' -d '{"account": "user01","clientType": 72,"createTokenType": 0}' 'https://api.meeting.huaweicloud.com/v1/usg/acs/auth/account'
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot