Authenticate a user, and retrieve a token to use in endpoints which require an authenticated user
User
POST/api/v1/user/login
Send your own credential. No customer is involved.
How authentication works- Yours
Authorization: Bearer
Language
Environment
Credentials
Your credential
Choose an environment first.
curl -X POST https://api.btcdirect.eu/api/v1/user/login \ -H "Authorization: Bearer $BTCD_PARTNER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "emailAddress": "mail@example.com", "password": "kDWPe4qf$&mgM26&8hX" }'Response
{ "uuid": "60bd85f1-1b05-427f-9226-915b6b13f39e", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}Request
emailAddressstring
Email address of the user.
Examplemail@example.com
passwordstring
Password of the user.
ExamplekDWPe4qf$&mgM26&8hX
Responses
200User logged in successfully.400A list of possible errors for this endpoint.Body of the success response
uuidstring
UUID of the user.
Example60bd85f1-1b05-427f-9226-915b6b13f39e
tokenstring
Authentication token. Use this to request resources requiring user authentication.
ExampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
refreshTokenstring
Refresh token. Use this to request a new authenticatoin token.
ExampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Every failure answers with a message and a code. Switch on the code — messages are written for people and can change.