Skip to main content

Login

POST{{server}}/api/v1/counter/login

Login Counter

This endpoint allows users to log in to the counter API.

Request Body

  • username (string, required): The username of the user.

  • password (string, required): The password of the user.

Response

  • username (string): The username of the logged-in user.

  • name (string): The name of the logged-in user.

  • token (string): The authentication token for the logged-in user.

  • sso (boolean): Indicates if single sign-on (SSO) used for login.

Request​

Headers​

KeyValue
Acceptapplication/json

Body (json)​

{
"username": "user1",
"password": "user1"
}

Code snippets​

curl -X POST '{{server}}/api/v1/counter/login' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "user1",
"password": "user1"
}'

Examples (2)​

Example request
POST{{server}}/api/v1/counter/login
Headers (1)
KeyValue
Acceptapplication/json
Body
{
"username": "user1",
"password": "user1"
}
Example response 200 Ok
Response headers (9)
KeyValue
Access-Control-Expose-Headers*
Cache-Controlno-store, no-cache, must-revalidate
Access-Control-Allow-Origin*
Access-Control-Allow-MethodsPOST, PUT, GET, OPTIONS, DELETE
Access-Control-Allow-Credentialstrue
Content-Length243
Access-Control-Max-Age86400
Access-Control-Allow-HeadersContent-Type, Authorization, X-Requested-With
Content-Typeapplication/json;charset=utf-8
Body
{
"username": "user1",
"name": "User 1",
"token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJxbmV0NyIsInN1YiI6IjAwMDAwMDAwLTAwMDAtNDAwMC0wMDAyLTAwMDAwMDAwMDAwNiIsImV4cCI6MTcyMDEzMDQwMCwic3NvIjpmYWxzZX0.c9-WdFMj6pWBKlyj8lgypCNtPUAs3Ihx4zwnCs9p-fM",
"sso": false
}