CreateAuthCookie
Updated at:
Copy as MD
Creates a new authentication cookie.
Request syntax
POST /2020-04-30/auth/cookies
Authorization: AuthorizationImportant
2020-04-30 is the version number of the edge OpenAPI. This value cannot be changed.Request parameters
| Parameter | Type | Required | Description |
| Authorization | String | Yes | Supports Basic authentication. The format is Basic base64(username:password). For example: Note
For more information, see Log on to the edge gateway console. |
Response syntax
HTTP/1.1 StatusCode
Set-Cookie: Cookie
Content-Type: application/jsonResponse parameters
| Parameter | Type | Description |
| StatusCode | Number | The HTTP status code. A status code of 201 indicates success. Other status codes indicate failure. For more information about status codes, see Status codes. |
| Cookie | String | The authentication cookie for subsequent API calls. |
Complete example
curl -i -c token.cookie -u admin:admin1234 -k -X POST https://127.0.0.1:9999/2020-04-30/auth/cookies
HTTP/1.1 201 Created
Server: openresty/1.13.6.2
Date: Wed, 15 Apr 2020 11:03:05 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: token=e82c2e9b7fe55a42143d89d1d635cd90a8ecef772a9520e3547028ad6a******; Max-Age=3600; Path=/Is this page helpful?