Python

Crema has some auth inbuilt APIs. Demo APIs listed here -

You can find out the Python auth APIs public repo here

All Auth APIs listed here -

Register User

POST https://www.your-domain.com/api/v1/users

This API is used for the register user

Request Body

Name
Type
Description

name*

String

Name of the user

email*

String

Name of the user

password*

String

Password for the account

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDA1Nzc5MTIsIm5iZiI6MTYwMDU3NzkxMiwianRpIjoiNzg0OWQyOWMtZjlkNC00ZDRlLWEwMjAtMjkzMTcxNzE5MmVkIiwiZXhwIjoxNjAwNTc4ODEyLCJpZGVudGl0eSI6MSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.Cx76YDyMWVVCb2gQPhQ4JejeQjY8_gbD2RTOZv4ZDHI",
    "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDA1Nzc5MTIsIm5iZiI6MTYwMDU3NzkxMiwianRpIjoiYWY4NTQ4NWMtZTUwZi00NWJkLWJkNTEtYzJjNTg3MDAzMGUwIiwiZXhwIjoxNjAzMTY5OTEyLCJpZGVudGl0eSI6MSwidHlwZSI6InJlZnJlc2gifQ.XXLZ7tAYuZDqfYvWZ9pX4EdNbQLfnlEclXWMaewOD3U"
}

Login User

POST https://www.your-domain.com/api/v1/auth

This API is used for the login user

Request Body

Name
Type
Description

name*

String

Email of the user

password*

String

Password of the account

Auth User

GET https://www.your-domain.com/api/v1/auth

This API is used to check the auth token validation

Headers

Name
Type
Description

Authorization*

String

Bearer token

Was this helpful?