misskey/src/docs/en-US/api.md
syuilo d6e3ec3218
New Crowdin updates (#7036)
* New translations pages.md (English)

* New translations pages.md (English)

* New translations pages.md (English)

* New translations deck.md (English)

* New translations deck.md (English)

* New translations deck.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (Chinese Traditional)

* New translations keyboard-shortcut.md (English)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (English)

* New translations keyboard-shortcut.md (English)

* New translations api.md (English)

* New translations create-plugin.md (English)

* New translations stream.md (English)

* New translations deck.md (English)

* New translations api.md (English)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (English)

* New translations stream.md (English)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (English)

* New translations stream.md (English)

* New translations api.md (English)

* New translations stream.md (English)

* New translations create-plugin.md (English)

* New translations create-plugin.md (English)

* New translations create-plugin.md (English)

* New translations create-plugin.md (English)

* New translations create-plugin.md (English)

* New translations aiscript.md (English)

* New translations create-plugin.md (English)

* New translations ja-JP.yml (French)

* New translations ja-JP.yml (Korean)

* New translations ja-JP.yml (Arabic)

* New translations ja-JP.yml (Spanish)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (Japanese, Kansai)

* New translations ja-JP.yml (Kannada)

* New translations ja-JP.yml (Kabyle)

* New translations ja-JP.yml (Ukrainian)

* New translations ja-JP.yml (Russian)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (French)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (Japanese, Kansai)

* New translations ja-JP.yml (Ukrainian)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (Spanish)

* New translations ja-JP.yml (Russian)

* New translations ja-JP.yml (Korean)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (English)

* New translations api.md (English)

* New translations api.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations api.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations api.md (English)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations reaction.md (Chinese Traditional)

* New translations stream.md (English)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations stream.md (English)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (Chinese Traditional)

* New translations timelines.md (Chinese Simplified)

* New translations ja-JP.yml (Chinese Simplified)

* New translations create-plugin.md (Chinese Simplified)

* New translations follow.md (Chinese Simplified)

* New translations timelines.md (Chinese Simplified)

* New translations deck.md (Chinese Simplified)

* New translations follow.md (Chinese Simplified)

* New translations deck.md (Chinese Simplified)

* New translations mfm.md (Chinese Simplified)

* New translations ja-JP.yml (Chinese Simplified)

* New translations follow.md (Chinese Simplified)

* New translations keyboard-shortcut.md (Chinese Simplified)

* New translations ja-JP.yml (Russian)

* New translations ja-JP.yml (Chinese Traditional)

* New translations ja-JP.yml (Russian)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (Thai)

* New translations aiscript.md (Thai)

* New translations api.md (Thai)

* New translations create-plugin.md (Thai)

* New translations custom-emoji.md (Thai)

* New translations follow.md (Thai)

* New translations keyboard-shortcut.md (Thai)

* New translations mute.md (Thai)

* New translations pages.md (Thai)

* New translations reaction.md (Thai)

* New translations reversi-bot.md (Thai)

* New translations stream.md (Thai)

* New translations theme.md (Thai)

* New translations timelines.md (Thai)

* New translations deck.md (Thai)

* New translations mfm.md (Thai)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Chinese Simplified)

* New translations keyboard-shortcut.md (Chinese Simplified)

* New translations keyboard-shortcut.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations keyboard-shortcut.md (Chinese Simplified)

* New translations keyboard-shortcut.md (Chinese Simplified)

* New translations keyboard-shortcut.md (Chinese Simplified)

* New translations ja-JP.yml (Chinese Simplified)

* New translations custom-emoji.md (Chinese Simplified)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Chinese Simplified)

* New translations mute.md (Chinese Simplified)

* New translations pages.md (Chinese Simplified)

* New translations ja-JP.yml (French)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (Chinese Simplified)

* New translations ja-JP.yml (Ukrainian)

* New translations ja-JP.yml (Chinese Traditional)
2020-12-31 19:45:30 +09:00

2.9 KiB

Misskey API

Using the Misskey API you can develop Misskey clients, Webservices integrating with Misskey, Bots (later called "Applications" here) etc. The streaming API also exists, so it is also possible to create real-time applications.

To starting using the API, you first need to get an access token. This page will explain how to acquire an access token and then give basic API usage instructions.

Obtaining an access token

Fundamentally, all API requests require an access token. The method of acquiring such an access token will vary depending on whether you yourself are sending API requests or requests are being sent through an application used by an end-user.

Manually issuing your own access token

You can create an access token in Settings > API

Proceed to using the API.

Requesting the application user to generate an access token

To obtain the access token of the end user for your app, request permissions for it via the below process.

Step 1

Generate a UUID.We will call it the session ID from here on.

The same session ID should not be used for multiple plugins, so please generate a new UUID for each plugin.

Step 2

Open the URL {_URL_}/miauth/{session} in the user's browser.Replace the {session} part with your previously generated session ID.

E.g.: {_URL_}/miauth/c1f6d42b-468b-4fd2-8274-e58abdedef6f

When opening this URL, you can set various settings via query prameters:

  • name ... Application name
    • E.g.: MissDeck

  • icon ... Icon URL of the application
    • E.g.: https://missdeck.example.com/icon.png

  • callback ... URL to redirect to after authorization
    • E.g.: https://missdeck.example.com/callback

    • In the redirect a session query parameter containing the session ID will be attached.
  • permission ... Permissions requested by the application
    • E.g.: write:notes,write:following,read:drive

    • List the requested permissions separated with a , character.
    • You can check all available permissions at the API Reference

Step 3

If you send a POST request to {_URL_}/api/miauth/{session}/check after the user has authorized the access token, the response will be a JSON object containing said token.

Properties included in the response:

  • token ... Access token of the user
  • user ... User data

Proceed to using the API.

Using the API

All API requests are POST, and all request and response data is formatted in JSON.There is no REST support. The access token must be included in the request parameter called i.