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)
This commit is contained in:
syuilo 2020-12-31 19:45:30 +09:00 committed by GitHub
parent 078b043cae
commit d6e3ec3218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1359 additions and 400 deletions

View file

@ -1,58 +1,58 @@
# Misskey API
MisskeyAPIを使ってMisskeyクライアント、Misskey連携Webサービス、Bot等(以下「アプリケーション」と呼びます)を開発できます。 ストリーミング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.
APIを使い始めるには、まずアクセストークンを取得する必要があります。 このドキュメントでは、アクセストークンを取得する手順を説明した後、基本的なAPIの使い方を説明します。
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.
## アクセストークンの取得
基本的に、APIはリクエストにはアクセストークンが必要となります。 APIにリクエストするのが自分自身なのか、不特定の利用者に使ってもらうアプリケーションなのかによって取得手順は異なります。
## 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.
* 前者の場合: [「自分自身のアクセストークンを手動発行する」](#自分自身のアクセストークンを手動発行する)に進む
* 後者の場合: [「アプリケーション利用者にアクセストークンの発行をリクエストする」](#アプリケーション利用者にアクセストークンの発行をリクエストする)に進む
* In case of the former: Move on to [ "Manually issuing your own access token" ](#自分自身のアクセストークンを手動発行する)
* In case of the latter: Move on to [ "Requesting the application user to generate an access token" ](#アプリケーション利用者にアクセストークンの発行をリクエストする)
### 自分自身のアクセストークンを手動発行する
「設定 > API」で、自分のアクセストークンを発行できます。
### Manually issuing your own access token
You can create an access token in Settings > API
[「APIの使い方」へ進む](#APIの使い方)
[Proceed to using the API.](#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
UUIDを生成する。以後これをセッションIDと呼びます。
Generate a UUID.We will call it the session ID from here on.
> このセッションIDは毎回生成し、使いまわさないようにしてください。
> The same session ID should not be used for multiple plugins, so please generate a new UUID for each plugin.
#### Step 2
`{_URL_}/miauth/{session}`をユーザーのブラウザで表示させる。`{session}`の部分は、セッションIDに置き換えてください。
> : `{_URL_}/miauth/c1f6d42b-468b-4fd2-8274-e58abdedef6f`
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`
表示する際、URLにクエリパラメータとしていくつかのオプションを設定できます:
* `name` ... アプリケーション名
* > : `MissDeck`
* `icon` ... アプリケーションのアイコン画像URL
* > : `https://missdeck.example.com/icon.png`
* `callback` ... 認証が終わった後にリダイレクトするURL
* > : `https://missdeck.example.com/callback`
* リダイレクト時には、`session`というクエリパラメータでセッションIDが付きます
* `permission` ... アプリケーションが要求する権限
* > : `write:notes,write:following,read:drive`
* 要求する権限を`,`で区切って列挙します
* どのような権限があるかは[APIリファレンス](/api-doc)で確認できます
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](/api-doc)
#### Step 3
ユーザーが発行を許可した後、`{_URL_}/api/miauth/{session}/check`にPOSTリクエストすると、レスポンスとしてアクセストークンを含むJSONが返ります。
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.
レスポンスに含まれるプロパティ:
* `token` ... ユーザーのアクセストークン
* `user` ... ユーザーの情報
Properties included in the response:
* `token` ... Access token of the user
* `user` ... User data
[「APIの使い方」へ進む](#APIの使い方)
[Proceed to using the API.](#APIの使い方)
## APIの使い方
**APIはすべてPOSTで、リクエスト/レスポンスともにJSON形式です。RESTではありません。** アクセストークンは、`i`というパラメータ名でリクエストに含めます。
## 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`.
* [APIリファレンス](/api-doc)
* [ストリーミングAPI](./stream)
* [API Reference](/api-doc)
* [Streaming API](./stream)