コンテンツにスキップ
Twexapi
日本語
Esc
↑↓移動↵開く⌘Jプレビュー

フォロー関係の確認

source_user_name が target_user_name をフォローしているか(following)、target_user_name が source_user_name をフォローしているか(followed_by)を確認します。1 回のリクエストで双方向の関係と、両ユーザーのユーザー名・ユーザー ID を返します。料金: $0.05 / 1,000 回。

APIリファレンスに戻る
/Followers & Following Endpoints
GET/twitter/user/check_follow_relationship
API 認証
AuthorizationBearer token · header必須
TwexAPIのグローバル認証トークン (Bearer Token)。ヘッダーに含める必要があります:Authorization: Bearer <YOUR_TWEXAPI_KEY>。
クエリパラメータ
source_user_namestring必須
ソースユーザーのユーザー名(@ の有無は問いません)。
matches ^\s*@?[A-Za-z0-9_]{1,15}\s*$
target_user_namestring必須
ターゲットユーザーのユーザー名(@ の有無は問いません)。
matches ^\s*@?[A-Za-z0-9_]{1,15}\s*$
レスポンス
200双方向のフォロー関係
codeinteger必須
msgstring必須
dataCheckFollowRelationshipData必須
プロパティを表示
source_user_namestring必須
ソースユーザーのユーザー名(X が返す表記)。
source_user_idstring | any必須
ソースユーザーのユーザー ID。
プロパティを表示
Any of:
string
string
any
any
target_user_namestring必須
ターゲットユーザーのユーザー名(X が返す表記)。
target_user_idstring | any必須
ターゲットユーザーのユーザー ID。
プロパティを表示
Any of:
string
string
any
any
followingboolean必須
ソースユーザーがターゲットユーザーをフォローしているかどうか。
followed_byboolean必須
ターゲットユーザーがソースユーザーをフォローしているかどうか。
400ユーザー名が未指定または無効です
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
401認証失敗
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
403ユーザーが凍結されているか、認証またはクォータが拒否されました
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
404いずれかのユーザーが見つかりません
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
429レート制限
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
500サーバーエラー
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
502上流サービスエラー
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
503サービス一時利用不可
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
504上流リクエストのタイムアウト
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
⚡インタラクティブテストGET
⚡インタラクティブテスト / Try APIGET
Live Console
🌐対象サーバー:https://api.twexapi.io
● 本番環境レディ
🔍
公開データ取得(TwexAPIキーのみ、Twitter Cookie不要)

本エンドポイントは公開Twitterデータの検索・取得用です。TwitterアカウントやCookieは一切不要です!下記の「API認証」に TwexAPIプラットフォームキー (Bearer Token) を入力するだけで即座にテストできます。

🔑API 認証
⚙️リクエストパラメータ (2)
📡
暂无响应数据

请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。

リクエスト例
curl -X GET "https://api.twexapi.io/twitter/user/check_follow_relationship?source_user_name=elonmusk&target_user_name=X" \
  -H "Authorization: Bearer YOUR_TOKEN"
レスポンス例
{
  "code": 200,
  "msg": "success",
  "data": {
    "source_user_name": "elonmusk",
    "source_user_id": "44196397",
    "target_user_name": "X",
    "target_user_id": "783214",
    "following": true,
    "followed_by": false
  }
}