Your Instagram Direct message threads
instagram.x.user-messagesList Instagram Direct conversations that customers started with your account
- Price
- freePelo preço do provedor
- Success rate
- —Ainda não há dados da taxa de sucessoAinda não há dados da taxa de sucesso
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/instagram.x.user-messagesPreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
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.
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de caminho | ||||
page_id | string | Obrigatório | required with Facebook Page authorization: linked Facebook Page id | 123456789012345 |
ig_user_id | string | Obrigatório | required with Instagram Login: numeric Instagram Professional account id | 17841400000000000 |
| Parâmetros de consulta | ||||
limit | inteiro | Opcional | 25 | |
fields | string | Opcional | request participants and messages together when preparing a reply | id,updated_time,participants,messages{id,from,to,message,created_time} |
platform | string | Obrigatório | required with Facebook Page authorization; selects Instagram rather than Messenger conversations | instagram |
- Parâmetros de caminho
page_idstringObrigatóriorequired with Facebook Page authorization: linked Facebook Page id
Exemplo:
123456789012345ig_user_idstringObrigatóriorequired with Instagram Login: numeric Instagram Professional account id
Exemplo:
17841400000000000- Parâmetros de consulta
limitinteiroOpcionalExemplo:
25fieldsstringOpcionalrequest participants and messages together when preparing a reply
Exemplo:
id,updated_time,participants,messages{id,from,to,message,created_time}platformstringObrigatóriorequired with Facebook Page authorization; selects Instagram rather than Messenger conversations
Exemplo:
instagram
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no 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());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a free, incluindo a taxa de serviço.