Your Instagram Direct message threads
instagram.x.user-messagesList Instagram Direct conversations that customers started with your account
- Price
- freeプロバイダー原価
- Success rate
- —成功率データはまだありません成功率データはまだありません
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/instagram.x.user-messagesPreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
Direct Instagram Login uses the Instagram Professional account id and an Instagram User token. Existing Facebook-backed connections use the linked Page id, add platform=instagram, and keep the same public endpoint id. Conversation ids are Graph API ids; an instagram.com/direct/t/... browser thread id is not interchangeable.
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| パスパラメータ | ||||
page_id | 文字列 | 必須 | required with Facebook Page authorization: linked Facebook Page id | 123456789012345 |
ig_user_id | 文字列 | 必須 | required with Instagram Login: numeric Instagram Professional account id | 17841400000000000 |
| クエリパラメータ | ||||
limit | 整数 | 任意 | 25 | |
fields | 文字列 | 任意 | request participants and messages together when preparing a reply | id,updated_time,participants,messages{id,from,to,message,created_time} |
platform | 文字列 | 必須 | required with Facebook Page authorization; selects Instagram rather than Messenger conversations | instagram |
- パスパラメータ
page_id文字列必須required with Facebook Page authorization: linked Facebook Page id
例:
123456789012345ig_user_id文字列必須required with Instagram Login: numeric Instagram Professional account id
例:
17841400000000000- クエリパラメータ
limit整数任意例:
25fields文字列任意request participants and messages together when preparing a reply
例:
id,updated_time,participants,messages{id,from,to,message,created_time}platform文字列必須required with Facebook Page authorization; selects Instagram rather than Messenger conversations
例:
instagram
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
curl -X GET 'https://toolswitch.dev/v1/tools/instagram.x.user-messages' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/instagram.x.user-messages",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/instagram.x.user-messages", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は free です。サービス料を含みます。