Skip to content

Sign in with email or username

POST
/login
curl --request POST \
--url https://api.proxyrequest.com/api/v1/login \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "password": "Correct-Horse-Battery-Staple-42" }'

Checks account credentials and returns an access token plus a refresh token. Send the access token as Authorization: Bearer .

  • None
object
email

Account email. Send either email or username.

string format: email
>= 1 characters
username

Account username. Send either username or email.

string
>= 1 characters
password
required

Current account password.

string
>= 1 characters
Examples
ExampleSignInWithEmail

Sign in with email

{
"email": "[email protected]",
"password": "Correct-Horse-Battery-Staple-42"
}

The operation completed successfully.

Media typeapplication/json
object
token
required

Short-lived access token used in the Authorization header.

string
refresh
required

Long-lived token used to request a new access token.

string
Examples
ExampleIssuedTokens

Issued tokens

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature"
}

The request is malformed or violates a business rule.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleValidationError

Validation error

{
"non_field_errors": [
"The request could not be processed."
],
"translation": "errors.request.invalid"
}