Authenticate
Authenticates a user from a username and password and return an access token. Use this access token in all requests to protected routes.
Body
-
The regex means: lowercase letters and numbers, separated by dashes, with no leading, trailing, or double dashes.
Maximum length is
64
. Format should match the following pattern:^[a-z0-9](-?[a-z0-9])*$
. -
Minimum length is
8
, maximum length is256
.
POST /authentication
curl \
-X POST https://example.com/authentication \
-H "Content-Type: application/json" \
-d '{"user_name":"happy-un1c0rn","password":"12345678"}'
Request example
{
"user_name": "happy-un1c0rn",
"password": "12345678"
}
Request examples
{
"user_name": "happy-un1c0rn",
"password": "12345678"
}
Response examples (201)
{
"user_identifier": "575a7328-4e2e-4b88-afcc-e0b5ed3920cc",
"access_token": "c59805ae394cceea937163877ca31375183650586137170a69652b6d8543e869"
}
Response examples (201)
{
"user_identifier": "575a7328-4e2e-4b88-afcc-e0b5ed3920cc",
"access_token": "c59805ae394cceea937163877ca31375183650586137170a69652b6d8543e869"
}