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

Sending a Puzzle Piece CAPTCHA

Description

This API is used to send a puzzle piece CAPTCHA. After receiving the request, the server returns the puzzle piece and original piece, which will be displayed on the frontend GUI. The enterprise user must fit the puzzle piece.

Figure 1 Puzzle piece CAPTCHA

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

POST

Request Address

/v1/usg/acs/auth/slideverifycode/send

Transport Protocol

HTTPS

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Location

Description

Content-Type

Yes

String

Header

Media format of the body.

Example: application/json; charset=UTF-8

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.

checkType

No

Integer

Body

Verification type. Default value: 0.

  • 0: login.
  • 1: password retrieval.

clientType

Yes

Integer

Body

Type of the login client.

  • 0: web client.
  • 5: PC client.
  • 6: mobile app.

user

Yes

String

Body

User identity information (mobile number, email address, or user account).

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

cutImage

String

Puzzle piece.

expire

Integer

Validity period of the CAPTCHA, in seconds.

pointY

Integer

Y coordinate of the puzzle piece.

shadowImage

String

Original image, which is defined using data:url.

token

String

Token of the verification code.

Example Request

POST /v1/usg/acs/auth/slideverifycode/send
Connection: keep-alive 
Host: api.meeting.huaweicloud.com
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191) 

{
    "user": "+86136********",
    "checkType": 1,
    "clientType": 0
}

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 
http_proxy_id: c94f64967745b0670c299c0688479078 

{
    "shadowImage": "data:image/png;base64,i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3uR5G0DDGrTaVSCwzGu9gFb6DNrtp0DxE8YngALHuFUyi5LSRyg9g1/hDbKY3mOphqezW+d/g7bg28wjR4Z4pUIrY0imjfgbFhFUv0yChpXcal2CYlVtNXu0yPML/xE//I/0Lj6OzuRtNED9L7RAz3HpNUf8S08pmUdWsOqAb1xzZjTmvicuHfvA4Zmf0ETRVTd+4hyklXkT5N4EkmeZZbPkmAmiaUTUayAl9GpHmIkbzWaNygChgBlozeGjYxIEYqcpv4wJKytW/BRiEfZR4lgP+i0k94RzK7GedW0Kuv6H5lXAts2ucRSSDPJN3G5baYg47xt/C/LhN3sJcF5bwAAAABJRU5ErkJggg==",
    "pointY": 55,
    "token": "x7QLcizPl2eAaNdKChs2XnbrbEMHuF1dy",
    "expire": 60
}

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.