* New translations ja-JP.yml (German) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Chinese Simplified) * New translations create-plugin.md (Esperanto) * New translations keyboard-shortcut.md (Esperanto) * New translations faq.md (Esperanto) * New translations misskey.md (Esperanto) * New translations stream.md (Esperanto) * New translations favorite.md (Esperanto) * New translations faq.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations keyboard-shortcut.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations keyboard-shortcut.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (French) * New translations ja-JP.yml (French) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (English) * New translations api.md (English) * New translations aiscript.md (English) * New translations create-plugin.md (English) * New translations stream.md (English) * New translations create-plugin.md (English) * New translations develop-bot.md (English) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (Spanish) * New translations ja-JP.yml (Spanish) * New translations troubleshooting.md (Spanish) * New translations glossary.md (Esperanto) * New translations glossary.md (Esperanto) * New translations glossary.md (Esperanto) * New translations glossary.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (German) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (English) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Russian) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations mfm.md (Esperanto) * New translations mfm.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Russian) * New translations note.md (Esperanto) * New translations ja-JP.yml (Russian) * New translations note.md (Esperanto) * New translations note.md (Esperanto) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (French) * New translations ja-JP.yml (French) * New translations ja-JP.yml (French) * New translations ja-JP.yml (French) * New translations ja-JP.yml (Russian) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Indonesian) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Russian) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (French) * New translations ja-JP.yml (French) * New translations glossary.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (French) * New translations ja-JP.yml (French) * New translations troubleshooting.md (French) * New translations troubleshooting.md (English) * New translations ja-JP.yml (Italian) * New translations note.md (Esperanto) * New translations glossary.md (French) * New translations apps.md (French) * New translations ja-JP.yml (French) * New translations note.md (Esperanto) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations ja-JP.yml (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (English) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations glossary.md (French) * New translations ja-JP.yml (French) * New translations glossary.md (French) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations glossary.md (Esperanto) * New translations api.md (English) * New translations create-plugin.md (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (English) * New translations ja-JP.yml (German) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Chinese Simplified) * New translations stream.md (Chinese Simplified) * New translations follow.md (Chinese Simplified) * New translations mfm.md (Chinese Simplified) * New translations mfm.md (Chinese Simplified)
59 lines
3.4 KiB
Markdown
59 lines
3.4 KiB
Markdown
# Misskey API
|
|
|
|
MisskeyAPIを使ってMisskeyクライアント、Misskey連携Webサービス、Bot等(以下「アプリケーション」と呼びます)を開発できます。 ストリーミングAPIもあるので、リアルタイム性のあるアプリケーションを作ることも可能です。
|
|
|
|
APIを使い始めるには、まずアクセストークンを取得する必要があります。 このドキュメントでは、アクセストークンを取得する手順を説明した後、基本的なAPIの使い方を説明します。
|
|
|
|
## Obtain an access token
|
|
基本的に、APIはリクエストにはアクセストークンが必要となります。 APIにリクエストするのが自分自身なのか、不特定の利用者に使ってもらうアプリケーションなのかによって取得手順は異なります。
|
|
|
|
* 前者の場合: [「自分自身のアクセストークンを手動発行する」](#自分自身のアクセストークンを手動発行する)に進む
|
|
* 後者の場合: [「アプリケーション利用者にアクセストークンの発行をリクエストする」](#アプリケーション利用者にアクセストークンの発行をリクエストする)に進む
|
|
|
|
### 自分自身のアクセストークンを手動発行する
|
|
「設定 > API」で、自分のアクセストークンを発行できます。
|
|
|
|
[「APIの使い方」へ進む](#APIの使い方)
|
|
|
|
### アプリケーション利用者にアクセストークンの発行をリクエストする
|
|
アプリケーション利用者のアクセストークンを取得するには、以下の手順で発行をリクエストします。
|
|
|
|
#### Step 1
|
|
|
|
Generate UUID.以後これをセッションIDと呼びます。
|
|
|
|
> このセッションIDは毎回生成し、使いまわさないようにしてください。
|
|
|
|
#### Step 2
|
|
|
|
`{_URL_}/miauth/{session}`をユーザーのブラウザで表示させる。`{session}`の部分は、セッションIDに置き換えてください。
|
|
> 例: `{_URL_}/miauth/c1f6d42b-468b-4fd2-8274-e58abdedef6f`
|
|
|
|
表示する際、URLにクエリパラメータとしていくつかのオプションを設定できます:
|
|
* `name` ... App name
|
|
* > 例: `MissDeck`
|
|
* `icon` ... App icon URL
|
|
* > 例: `https://missdeck.example.com/icon.png`
|
|
* `callback` ... 認証が終わった後にリダイレクトするURL
|
|
* > 例: `https://missdeck.example.com/callback`
|
|
* リダイレクト時には、`session`というクエリパラメータでセッションIDが付きます
|
|
* `permission` ... App permissions
|
|
* > 例: `write:notes,write:following,read:drive`
|
|
* 要求する権限を`,`で区切って列挙します
|
|
* どのような権限があるかは[APIリファレンス](/api-doc)で確認できます
|
|
|
|
#### Step 3
|
|
ユーザーが発行を許可した後、`{_URL_}/api/miauth/{session}/check`にPOSTリクエストすると、レスポンスとしてアクセストークンを含むJSONが返ります。
|
|
|
|
レスポンスに含まれるプロパティ:
|
|
* `token` ... User access token
|
|
* `user` ... User info
|
|
|
|
[「APIの使い方」へ進む](#APIの使い方)
|
|
|
|
## API usage
|
|
**APIはすべてPOSTで、リクエスト/レスポンスともにJSON形式です。There is no REST support.** アクセストークンは、`i`というパラメータ名でリクエストに含めます。
|
|
|
|
* [API Reference](/api-doc)
|
|
* [Streaming API](./stream)
|