sharkey/src/docs/id-ID/api.md
syuilo a47358f590
New Crowdin updates (#7046)
* New translations ja-JP.yml (German)

* New translations ja-JP.yml (English)

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

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

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

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

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

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

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

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

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

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

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

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

* New translations aiscript.md (German)

* New translations theme.md (German)

* New translations reaction.md (German)

* New translations theme.md (German)

* New translations theme.md (German)

* New translations ja-JP.yml (German)

* New translations theme.md (German)

* New translations timelines.md (German)

* New translations ja-JP.yml (German)

* New translations mute.md (German)

* New translations timelines.md (German)

* New translations mute.md (German)

* New translations reaction.md (German)

* New translations pages.md (German)

* New translations reaction.md (German)

* New translations follow.md (German)

* New translations pages.md (German)

* New translations custom-emoji.md (German)

* New translations follow.md (German)

* New translations custom-emoji.md (English)

* New translations deck.md (German)

* New translations mfm.md (German)

* New translations create-plugin.md (German)

* New translations deck.md (German)

* New translations create-plugin.md (German)

* New translations create-plugin.md (English)

* New translations create-plugin.md (German)

* New translations keyboard-shortcut.md (German)

* New translations keyboard-shortcut.md (German)

* New translations create-plugin.md (German)

* New translations keyboard-shortcut.md (German)

* New translations create-plugin.md (German)

* New translations create-plugin.md (German)

* New translations reversi-bot.md (German)

* New translations create-plugin.md (English)

* New translations reversi-bot.md (English)

* New translations create-plugin.md (German)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (German)

* New translations stream.md (German)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (English)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (German)

* New translations reversi-bot.md (German)

* New translations pages.md (Chinese Simplified)

* New translations pages.md (Chinese Simplified)

* New translations pages.md (Chinese Simplified)

* New translations pages.md (Chinese Simplified)

* New translations reaction.md (Chinese Simplified)

* New translations reaction.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations ja-JP.yml (German)

* New translations api.md (German)

* New translations keyboard-shortcut.md (German)

* New translations api.md (German)

* New translations stream.md (German)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations ja-JP.yml (German)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

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

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

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

* New translations stream.md (German)

* New translations ja-JP.yml (German)

* New translations reversi-bot.md (German)

* New translations stream.md (German)

* New translations stream.md (German)

* New translations stream.md (German)

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

* New translations stream.md (German)

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

* New translations stream.md (German)

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

* New translations stream.md (German)

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

* New translations stream.md (English)

* New translations stream.md (German)

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

* New translations stream.md (German)

* New translations stream.md (German)

* New translations stream.md (German)

* New translations stream.md (English)

* New translations stream.md (German)

* New translations api.md (German)

* New translations api.md (English)

* New translations api.md (German)

* New translations api.md (German)

* New translations api.md (English)

* New translations api.md (German)

* New translations api.md (German)

* New translations api.md (German)

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

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

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

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

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

* New translations reversi-bot.md (Chinese Simplified)

* New translations reversi-bot.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations stream.md (Chinese Simplified)

* New translations ja-JP.yml (Kabyle)

* New translations ja-JP.yml (Korean)

* New translations ja-JP.yml (Spanish)

* New translations ja-JP.yml (Russian)

* New translations ja-JP.yml (German)

* New translations ja-JP.yml (English)

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

* New translations ja-JP.yml (Polish)

* New translations custom-emoji.md (Polish)

* New translations mute.md (Polish)

* New translations ja-JP.yml (Polish)

* New translations ja-JP.yml (Polish)

* New translations follow.md (Polish)

* New translations ja-JP.yml (Polish)

* New translations create-plugin.md (Polish)

* New translations reaction.md (Polish)

* New translations theme.md (Polish)

* New translations timelines.md (Polish)

* New translations ja-JP.yml (English)

* New translations ja-JP.yml (Polish)

* New translations ja-JP.yml (Polish)

* New translations ja-JP.yml (Polish)

* New translations aiscript.md (Polish)

* New translations keyboard-shortcut.md (Polish)

* New translations pages.md (Polish)

* New translations reversi-bot.md (Polish)

* New translations stream.md (Polish)

* New translations theme.md (Polish)

* New translations ja-JP.yml (Polish)

* New translations timelines.md (Polish)

* New translations deck.md (Polish)

* New translations ja-JP.yml (Indonesian)

* New translations aiscript.md (Indonesian)

* New translations api.md (Indonesian)

* New translations create-plugin.md (Indonesian)

* New translations custom-emoji.md (Indonesian)

* New translations follow.md (Indonesian)

* New translations keyboard-shortcut.md (Indonesian)

* New translations mute.md (Indonesian)

* New translations pages.md (Indonesian)

* New translations reaction.md (Indonesian)

* New translations reversi-bot.md (Indonesian)

* New translations stream.md (Indonesian)

* New translations theme.md (Indonesian)

* New translations timelines.md (Indonesian)

* New translations deck.md (Indonesian)

* New translations mfm.md (Indonesian)

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

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

* New translations ja-JP.yml (Indonesian)

* New translations keyboard-shortcut.md (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations reaction.md (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations mute.md (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations custom-emoji.md (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)

* New translations ja-JP.yml (Indonesian)
2021-01-04 17:38:53 +09:00

3.5 KiB

Misskey API

MisskeyAPIを使ってMisskeyクライアント、Misskey連携Webサービス、Bot等(以下「アプリケーション」と呼びます)を開発できます。 ストリーミングAPIもあるので、リアルタイム性のあるアプリケーションを作ることも可能です。

APIを使い始めるには、まずアクセストークンを取得する必要があります。 このドキュメントでは、アクセストークンを取得する手順を説明した後、基本的なAPIの使い方を説明します。

アクセストークンの取得

基本的に、APIはリクエストにはアクセストークンが必要となります。 APIにリクエストするのが自分自身なのか、不特定の利用者に使ってもらうアプリケーションなのかによって取得手順は異なります。

自分自身のアクセストークンを手動発行する

「設定 > API」で、自分のアクセストークンを発行できます。

「APIの使い方」へ進む

アプリケーション利用者にアクセストークンの発行をリクエストする

アプリケーション利用者のアクセストークンを取得するには、以下の手順で発行をリクエストします。

Step 1

UUIDを生成する。以後これをセッションIDと呼びます。

このセッションIDは毎回生成し、使いまわさないようにしてください。

Step 2

{_URL_}/miauth/{session}をユーザーのブラウザで表示させる。{session}の部分は、セッションIDに置き換えてください。

例: {_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リファレンスで確認できます

Step 3

ユーザーが発行を許可した後、{_URL_}/api/miauth/{session}/checkにPOSTリクエストすると、レスポンスとしてアクセストークンを含むJSONが返ります。

レスポンスに含まれるプロパティ:

  • token ... ユーザーのアクセストークン
  • user ... ユーザーの情報

「APIの使い方」へ進む

APIの使い方

APIはすべてPOSTで、リクエスト/レスポンスともにJSON形式です。RESTではありません。 アクセストークンは、iというパラメータ名でリクエストに含めます。