Skip to content

Instantly share code, notes, and snippets.

@rinsuki
Last active October 29, 2019 06:49
Show Gist options
  • Save rinsuki/8d753e888d000210fbae to your computer and use it in GitHub Desktop.
Save rinsuki/8d753e888d000210fbae to your computer and use it in GitHub Desktop.
Misskey API リファレンス(Unofficial)

#Misskey API リファレンス(Unofficial)

##最初に

このAPIリファレンスは非公式だし、書きかけです。
使用する際には自己責任でお願いします。
あとAPIがちゃんと使えるかどうかは確認してません。
Authorizeを除いてパラメータは必須と書いていない物以外はすべて任意です
##参考までに

非公式 認証APIリファレンス

  1. http://dev.misskey.xyz/ からapp-keyを入手する
  2. https://api.misskey.xyz/sauth/get-authentication-session-key にGETリクエストを送る
  • ヘッダー
    • sauth-app-key:あなたのapp-key
  • レスポンス
    • JSON
    • このうち使うのはauthenticationSessionKey
  1. https://api.misskey.xyz/authorize@先程のauthenticationSessionKey をブラウザで開かせる
  2. PINコードを入手する
  • callback urlを指定している場合はGETパラメータのpin-codeにやってくる
  1. https://api.misskey.xyz/sauth/get-user-key にGETリクエストを送る
  • ヘッダー
    • sauth-app-key:あなたのapp-key
  • パラメータ
    • pin-code:PINコード
    • authentication-session-key:先程のauthenticationSessionKey
  • レスポンス
    • JSON
      • このうち使うのはuserKeyのみ

あとはヘッダーに

  • sauth-app-keyにあなたのapp-key
  • sauth-user-keyに先程のuserKey

を含めてリクエストするだけ

##status

  • GET status/timeline
    • タイムラインを取得
    • パラメータ
      • since-cursor
      • max-cursor
      • count
    • レスポンス
      • ステータスオブジェクトの配列
  • POST status/update
    • 投稿する
    • パラメータ
      • text(必須)
    • レスポンス
      • ステータスオブジェクト
  • POST status/repost
    • RePostする
    • パラメータ
      • status-id(必須)
      • text
    • レスポンス
      • 恐らくステータスオブジェクト?
    • 参考までに
      • 指定されたstatus-idがRePostだったらRePost元をRePostするっぽいので心配は無用?
  • POST status/favorite
    • ふぁぼる
    • パラメータ
      • status-id(必須)
    • レスポンス
      • 恐らくない?
    • 参考までに
      • すでにふぁぼっているとHTTPステータスコード400のエラーが返ってくるので注意
  • GET status/show
    • 指定したステータスを取得
    • パラメータ
      • status-id(必須)
    • レスポンス
      • ステータスオブジェクト

##users

  • GET users/show
    • ユーザー情報を取得
    • パラメータ
      • user-id(必須)
    • レスポンス
      • ユーザーオブジェクト
  • POST users/follow
    • フォローする
    • パラメータ
      • user-id(必須)
    • レスポンス
      • 恐らくユーザーオブジェクト
  • DELETE users/unfollow
    • リムる
    • パラメータ
      • user-id(必須)
    • レスポンス
      • 恐らくユーザーオブジェクト

##notice

  • POST notice/create
    • 通知を作成する
    • パラメータ
      • text
    • レスポンス
      • 通知オブジェクト
    • 参考までに
      • レートリミットが設定されているようだ。100リクエスト/86400秒?
      • 通知タイプはapplication固定
  • GET notice/timeline
    • 通知一覧を取得する
    • パラメータ
      • since-cursor
      • max-cursor
      • count
    • レスポンス
      • 通知オブジェクトの配列
  • DELETE notice/delete
    • 指定された通知1件を削除する
    • パラメータ
      • notice-id(必須)
    • レスポンス
      • status
        • success
  • DELETE notice/delete-all
    • 通知全てを削除する
    • レスポンス
      • status
        • success
@syuilo
Copy link

syuilo commented Aug 19, 2015

Awesome

@rinsuki
Copy link
Author

rinsuki commented Aug 20, 2015

@syuilo thx :)

Copy link

ghost commented Aug 20, 2015

参考になった。Thank you!

@incognico
Copy link

Sadly it's totally outdated :(

How would I authorize an app to a user now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment