cURL
curl "https://api.superskope.com/api/v1/chats/120000000000@g.us/messages?limit=50" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY"import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
const result = await client.messages('120000000000@g.us', { limit: 50 });
console.log(result);
import os
import requests
response = requests.get(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/messages",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}"},
params={"limit": 50},
timeout=40,
)
print(response.status_code, response.json())
{
"accountId": "<string>",
"chatId": "<string>",
"messages": [
{
"id": "<string>",
"text": "<string>",
"kind": "<string>",
"fromMe": true,
"timestamp": 123,
"hasMedia": true,
"sender": "<string>",
"senderName": "<string>",
"senderNumber": "<string>",
"ack": 1,
"replyTo": {
"id": "<string>",
"text": "<string>",
"kind": "<string>",
"number": "<string>",
"unavailable": true
},
"mentions": [
"<string>"
]
}
],
"hasMore": true,
"nextOffset": 123,
"before": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Messages
List messages
Read message history without marking read. Requires messages:read. Only the key’s selected conversations are accessible.
cURL
curl "https://api.superskope.com/api/v1/chats/120000000000@g.us/messages?limit=50" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY"import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
const result = await client.messages('120000000000@g.us', { limit: 50 });
console.log(result);
import os
import requests
response = requests.get(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/messages",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}"},
params={"limit": 50},
timeout=40,
)
print(response.status_code, response.json())
{
"accountId": "<string>",
"chatId": "<string>",
"messages": [
{
"id": "<string>",
"text": "<string>",
"kind": "<string>",
"fromMe": true,
"timestamp": 123,
"hasMedia": true,
"sender": "<string>",
"senderName": "<string>",
"senderNumber": "<string>",
"ack": 1,
"replyTo": {
"id": "<string>",
"text": "<string>",
"kind": "<string>",
"number": "<string>",
"unavailable": true
},
"mentions": [
"<string>"
]
}
],
"hasMore": true,
"nextOffset": 123,
"before": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}