# Using Appmixer API

The Appmixer API allows you to access all the features that the UI works with via a REST API. If you followed the "Getting Started" section, you should have a user signed-up in Appmixer. In order to access the data of the user via the API, you need to have their access token. Use the following API call to get the token (don't forget to replace the "<abc@example.com>" and "abc321" with your own user's username and password):

```bash
curl -XPOST "http://localhost:2200/user/auth" -d '{"username": "abc@example.com", "password": "abc321"}' -H 'Content-Type: application/json'
```

You should see a response that looks like this:

```
{"user":{"id":"5c88c7cc04a917256c726c3d","username":"abc@example.com","isActive":false,"email":"abc@example.com","plan":"free"},"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVjODhjN2NjMDRhOTE3MjU2YzcyNmMzZCIsInNjb3BlIjpbInVzZXIiXSwiaWF0IjoxNTUyNDkzMTA0LCJleHAiOjE1NTUwODUxMDR9.sdU3Jt2MjmVuBNak0FwR0ETcjleRyiA6bqjMPA6f-ak"}
```

Copy the `token` and use it to authorize the user in your next API calls. For example, to get the number of flows the user created, use:

```bash
curl "http://localhost:2200/flows/count" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVjODhjN2NjMDRhOTE3MjU2YzcyNmMzZCIsInNjb3BlIjpbInVzZXIiXSwiaWF0IjoxNTUyNDkyNjA5LCJleHAiOjE1NTUwODQ2MDl9.9jVcqY0qo9Q_1GeK9Fg14v7OrdpWvzmqnv4jDMZfqnI"
```

You should see a response that tells you how many flows the user has in their account:

```
{"count":5}
```

Please see the [API](https://docs.appmixer.com/6.0/5.2/api/flows) section to learn more about all the endpoints that you use.
