Your Instagram Direct message threads
instagram.x.user-messagesList Instagram Direct conversations that customers started with your account
- Price
- freeAu prix du fournisseur
- Success rate
- —Aucune donnée de taux de réussite pour le momentAucune donnée de taux de réussite pour le moment
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/instagram.x.user-messagesPreview- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
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.
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Paramètres de chemin | ||||
page_id | chaîne | Obligatoire | required with Facebook Page authorization: linked Facebook Page id | 123456789012345 |
ig_user_id | chaîne | Obligatoire | required with Instagram Login: numeric Instagram Professional account id | 17841400000000000 |
| Paramètres de requête | ||||
limit | entier | Facultatif | 25 | |
fields | chaîne | Facultatif | request participants and messages together when preparing a reply | id,updated_time,participants,messages{id,from,to,message,created_time} |
platform | chaîne | Obligatoire | required with Facebook Page authorization; selects Instagram rather than Messenger conversations | instagram |
- Paramètres de chemin
page_idchaîneObligatoirerequired with Facebook Page authorization: linked Facebook Page id
Exemple :
123456789012345ig_user_idchaîneObligatoirerequired with Instagram Login: numeric Instagram Professional account id
Exemple :
17841400000000000- Paramètres de requête
limitentierFacultatifExemple :
25fieldschaîneFacultatifrequest participants and messages together when preparing a reply
Exemple :
id,updated_time,participants,messages{id,from,to,message,created_time}platformchaîneObligatoirerequired with Facebook Page authorization; selects Instagram rather than Messenger conversations
Exemple :
instagram
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
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());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à free, frais de service inclus.