Get a profile with its spotlights and stories
curl --request POST \
--url https://api.stophy.dev/v1/snapchat/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": "khaby.lame"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user: 'khaby.lame'})
};
fetch('https://api.stophy.dev/v1/snapchat/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/snapchat/profile"
payload = { "user": "khaby.lame" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"profile": {
"url": "<string>",
"isVerified": true,
"isBusiness": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"bio": "<string>",
"website": "<string>",
"avatar": "<string>",
"banner": "<string>",
"subscribers": 0,
"category": "<string>",
"subcategory": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"related": [
"<string>"
]
},
"spotlights": [
{
"url": "<string>",
"id": "<string>",
"video": "<string>",
"thumbnail": "<string>",
"views": 0,
"shares": 0,
"createdAt": "2023-11-07T05:31:56Z",
"durationSeconds": 123,
"width": 0,
"height": 0,
"hashtags": [
"<string>"
]
}
],
"stories": [
{
"type": "image",
"id": "<string>",
"url": "<string>",
"thumbnail": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Snapchat
Snapchat profile API
Call the Snapchat profile API to get profile, spotlights and stories, as JSON or markdown. 2 credits.
POST
/
v1
/
snapchat
/
profile
Get a profile with its spotlights and stories
curl --request POST \
--url https://api.stophy.dev/v1/snapchat/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": "khaby.lame"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user: 'khaby.lame'})
};
fetch('https://api.stophy.dev/v1/snapchat/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/snapchat/profile"
payload = { "user": "khaby.lame" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"profile": {
"url": "<string>",
"isVerified": true,
"isBusiness": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"bio": "<string>",
"website": "<string>",
"avatar": "<string>",
"banner": "<string>",
"subscribers": 0,
"category": "<string>",
"subcategory": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"related": [
"<string>"
]
},
"spotlights": [
{
"url": "<string>",
"id": "<string>",
"video": "<string>",
"thumbnail": "<string>",
"views": 0,
"shares": 0,
"createdAt": "2023-11-07T05:31:56Z",
"durationSeconds": 123,
"width": 0,
"height": 0,
"hashtags": [
"<string>"
]
}
],
"stories": [
{
"type": "image",
"id": "<string>",
"url": "<string>",
"thumbnail": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
snapchat.profile - Returns:
datahasprofile,spotlights,stories. - Cost: 2 credits. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.snapchat.profile({ user: "khaby.lame" });
console.log(result.data.profile);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.snapchat.profile(user="khaby.lame")
print(result["data"]["profile"])
curl -X POST https://api.stophy.dev/v1/snapchat/profile \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"user":"khaby.lame"}'
stophy snapchat profile khaby.lame
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json