0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

TalknoteApiの利用開始方法

Posted at

公式ドキュメントの手順通りに進めていく。
https://developer.talknote.com/doc/#top

Talknote管理者設定よりAPI公開設定にする

この際にクレデンシャル情報をもらう

トークンの取得

  1. 管理者よりリダイレクトURLをもらい、ブラウザでアクセスする。
  2. Outh認証画面にいくため、F12で開発者ツールを開いた後、ログイン情報を入力しログインする。
  3. 開発者ツールのネットワークのGETリクエストのペイロードにCodeが表示されるため控える。
  4. curl等でPOSTリクエストを実行する。
  5. 成功すれば、json形式でアクセストークンが返却される。

コマンド例

curl -X POST -d "client_id=da271bfbab783480eb3fcf8aadf5a0d07c17dddd" -d "client_secret={secret}" -d "redirect_uri=https://company.talknote.com/example.com/auth_validate" -d "grant_type=authorization_code" -d "code={code}" https://oauth.talknote.com/oauth/token

説明付き

curl -X POST 
-d "client_id=da271bfbab783480eb3fcf8aadf5a0d07c17dddd" # talknoteの公開APIのid
-d "client_secret={secret}"  # talknoteの公開APIのsercret key
-d "redirect_uri=https://company.talknote.com/example.com/auth_validate" # talknoteの公開APIのurl
-d "grant_type=authorization_code"  # 固定
-d "code={code}" # ブラウザでアクセスした際にOuthで発行されるコード
https://oauth.talknote.com/oauth/token # 固定

APIの利用

使う際はヘッダーにX-TALKNOTE-OAUTH-TOKENをつける

curl -X POST -H "X-TALKNOTE-OAUTH-TOKEN:{token}" -d 'message=iine' https://eapi.talknote.com/api/v1/group/post/417600
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?