XのAPIキーを取得しましょう
1. XのAPIの利用登録をしましょう
- 次のリンクからXの開発者プラットフォームにアクセス:開発者プラットフォームへ
- 画面右上の「開発者ポータル」をクリックし、Sign up for Free Accountを選択
- 必要項目を入力して登録を完了:
- Describe all of your use cases of Twitter’s data and API → XのAPIとデータの使用事例を説明
- 以下に申請例を示します。英語の部分をコピーしやすいようにコードブロックで表示します:
I am a developer specializing in programming and design, and also a blogger focusing on app development. I am currently crafting a tool that automatically posts relevant tips and blog content to X. These posts, comprising text, images, and related blog URLs, are designed to adhere to X’s policies and provide value to my followers.
- 以下のチェックボックスにチェック:
- You may not resell anything you receive via the Twitter APIs
- Your Developer account may be terminated if you violate terms
- You accept the Terms & Conditions
- 最後にSubmitボタンをクリックし、申請完了

2. XのAPIキーを取得しましょう
- 次のリンクからDeveloper Portalを開く:Developerポータルへ
- 左サイドバーのアプリ名をクリックし、User authentication settingsのEditを選択
- 以下を設定:
- Read and write: 投稿に必要な権限
- Web App, Automated App or Bot: アプリタイプ
- Callback URI / Redirect URL
https://affisync.site/x-auth
- Website URL: 自身のサイトURL(以下のようにAffiSyncのurlを設定しても良いですし,自身のXのプロフィールのurlを設定しても良いです)
- 保存後、OAuth 2.0 Client IDとClient Secretをメモ
3. AffiSyncに取得したキーを登録
- 設定画面にて、取得したClient IDとClient Secretを入力
- 各種キーを登録