Your Instagram Direct message threads
instagram.x.user-messagesList Instagram Direct conversations that customers started with your account
- Price
- freeZum Anbieterpreis
- Success rate
- —Noch keine ErfolgsratendatenNoch keine Erfolgsratendaten
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/instagram.x.user-messagesPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameter
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.
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Pfadparameter | ||||
page_id | Zeichenkette | Erforderlich | required with Facebook Page authorization: linked Facebook Page id | 123456789012345 |
ig_user_id | Zeichenkette | Erforderlich | required with Instagram Login: numeric Instagram Professional account id | 17841400000000000 |
| Abfrageparameter | ||||
limit | Ganzzahl | Optional | 25 | |
fields | Zeichenkette | Optional | request participants and messages together when preparing a reply | id,updated_time,participants,messages{id,from,to,message,created_time} |
platform | Zeichenkette | Erforderlich | required with Facebook Page authorization; selects Instagram rather than Messenger conversations | instagram |
- Pfadparameter
page_idZeichenketteErforderlichrequired with Facebook Page authorization: linked Facebook Page id
Beispiel:
123456789012345ig_user_idZeichenketteErforderlichrequired with Instagram Login: numeric Instagram Professional account id
Beispiel:
17841400000000000- Abfrageparameter
limitGanzzahlOptionalBeispiel:
25fieldsZeichenketteOptionalrequest participants and messages together when preparing a reply
Beispiel:
id,updated_time,participants,messages{id,from,to,message,created_time}platformZeichenketteErforderlichrequired with Facebook Page authorization; selects Instagram rather than Messenger conversations
Beispiel:
instagram
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
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());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit free einschließlich Servicegebühr abgerechnet.