Authentication
The vast majority of API endpoints within the Appmixer require an access token to execute the calls. The following methods explain how to create a user and obtain the access token through the sign-in endpoint.
Sign-in User
POST https://api.YOUR_TENANT.appmixer.cloud/user/auth
Sign in a user with credentials and get their access token.
curl -XPOST "https://api.appmixer.com/user/auth" -H "Content-type: application/json" -d '{ "username": "[email protected]", "password": "abc321" }'
You can sign in either with your username and password or with your email and password.
Request Body
password*
string
Password.
username
string
Username. If the email is not provided in the body, a username is required. Hence, a username or email must be included.
string
Email. If the username is not provided in the body, an email is required. Hence, a username or email must be included.
{
    "user": {
        "id": "5c88c7cc04a917256c726c3d",
        "username":"[email protected]",
        "isActive": false,
        "email": "[email protected]", 
        "plan":"free"
    },
    "token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVjODhjN2NjMDRhOTE3MjU2YzcyNmMzZCIsInNjb3BlIjpbInVzZXIiXSwiaWF0IjoxNTUyNDkyNjA5LCJleHAiOjE1NTUwODQ2MDl9.9jVcqY0qo9Q_1GeK9Fg14v7OrdpWvzmqnv4jDMZfqnI"
}Create User
POST https://api.YOUR_TENANT.appmixer.cloud/user
Create user. By default, this endpoint is open (does not require authentication). This can be changed by setting the API_USER_CREATE_SCOPE system configuration. If you set the value of API_USER_CREATE_SCOPE to for example admin, then an admin token will be required to call this API.
curl -XPOST "https://api.appmixer.com/user" -H "Content-type: application/json" -d '{ "username": "[email protected]", "email": "[email protected]", "password": "abc321" }'
Request Body
password*
string
Password.
email*
string
Email address.
username*
string
Username.
{
    "token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVjODhjN2NjMDRhOTE3MjU2YzcyNmMzZCIsInNjb3BlIjpbInVzZXIiXSwiaWF0IjoxNTUyNDkyNjA5LCJleHAiOjE1NTUwODQ2MDl9.9jVcqY0qo9Q_1GeK9Fg14v7OrdpWvzmqnv4jDMZfqnI"
}Get User Information
GET https://api.YOUR_TENANT.appmixer.cloud/user
Get user information.
curl "https://api.appmixer.com/user" -H "Authorization: Bearer [ACCESS_TOKEN]"
{
  "id": "58593f07c3ee4f239dc69ff7",
  "username": "[email protected]",
  "isActive": true,
  "email": "[email protected]",
  "scope": [
    "user"
  ],
  "plan": "beta"
}Last updated
Was this helpful?
