By using the official Misskey SDK or third party libraries, you can use the API more conveniently, for example by simplifying some of the steps described in this document.
See [here](TODO) for more information about libraries.
:::
To start using the API, you will need to obtain an **access token** associated with the account you wish to use the API with.
This document will walk you through the process of obtaining an access token and then show you how to use the API in a basic way.
## Getting an access token
The API generally requires an access token to make a request.
An access token is a set of credentials associated with a user, which identifies the user using the API and controls what operations each access token is authorised to perform.
There is a one-to-many relationship between a user and the access token associated with that user, and multiple access tokens can be issued for a given user.
:::
You can easily [obtain an access token for yourself](#Manually-issue-an-access-token), or you can [obtain an access token for an user who will be using your application](#Request-an-access-token-to-be-issued).
### Manually issue an access token
You can issue your own access token in Misskey Web under 'Settings > API'.
This session ID should be generated each time and should not be reused.
:::
#### Step 2
The application authentication form should be displayed in the user's browser. The authentication form can be opened with a URL similar to this:
```:no-line-numbers
https://{host}/miauth/{session}
```
where
-`{host}` is the host of the user's instance (usually this is entered by the user) and
-`{session}` is the session ID.
You can also set a few options as query parameters to the URL:
| name | description |
| ---- | ---- |
| `name` | application name |
| `icon` | application icon image URL。 |
| `callback` | The URL to which the user will be redirected after authentication, with the session ID added to the redirect with the query parameter `session`. |
| `permission` | The permissions that the application requires. <br>List the permissions to be requested, separated by `,`. The list of permissions can be found [here](TODO). |
After the user has been granted application access, a POST request to a URL of the following form will return JSON containing the access token as a response.
```:no-line-numbers
https://{host}/api/miauth/{session}/check
```
where
-`{host}` is the host of the user's instance and
-`{session}` is the session ID.
The properties included in the response are as follows:
| name | description |
| ---- | ---- |
| `token` | access token for the user |
| `user` | information about the user |
## Using the API
Once you have your API access token, you can use the API by making requests to the various endpoints.