Simplified REST API to get stickers from Snap
- Request:
url = "https://sticker-kit-horizon733.cloud.okteto.net/search_stickers?search_text=morning&results_count=1"
headers = {"api_token": f"Bearer {your-api-token}"}
requests.post(url=url, headers=headers)
- Reponse:
{
"stickers": [
{
"itemType": "SNAPCHAT_STICKERS",
"id": "AdUq16II9jTD",
"pngURL": "https://bolt-gcdn.sc-cdn.net/3/dRORxCGc9jycqgwaRIXoH?bo=EiIaABoAMgF9OgsEBQcNDxFydHZ3e0IGCNSV5usFSAJQB2AB&uc=7&appID=00f481a8-6716-4af7-ad1c-8a35cd6e00fb&sessionID=c6ca4264-e12d-4a23-9535-68b9e89829e7",
"thumbnailURL": "https://bolt-gcdn.sc-cdn.net/3/dRORxCGc9jycqgwaRIXoH?bo=EiIaABoAMgF9OgsEBQcNDxFydHZ3e0IGCNSV5usFSAJQB2AB&uc=7&appID=00f481a8-6716-4af7-ad1c-8a35cd6e00fb&sessionID=c6ca4264-e12d-4a23-9535-68b9e89829e7"
}
]
}
- Request:
url = "https://sticker-kit-horizon733.cloud.okteto.net/trending_stickers?results_count=1"
headers = {"api_token": f"Bearer {your-api-token}"}
requests.post(url=url, headers=headers)
- Reponse:
{
"stickers": [
{
"id": "AS0b8vs3e90T",
"pngURL": "https://bolt-gcdn.sc-cdn.net/3/oirSJQJYAe0DAGwpOnWFq?bo=EiIaABoAMgF9OgsEBQcNDxFydHZ3e0IGCPGJ_PIFSAJQB2AB&uc=7&appID=00f481a8-6716-4af7-ad1c-8a35cd6e00fb&sessionID=1de85c89-aefd-4dcd-89d1-fa536242faad",
"thumbnailURL": "https://bolt-gcdn.sc-cdn.net/3/oirSJQJYAe0DAGwpOnWFq?bo=EiIaABoAMgF9OgsEBQcNDxFydHZ3e0IGCPGJ_PIFSAJQB2AB&uc=7&appID=00f481a8-6716-4af7-ad1c-8a35cd6e00fb&sessionID=1de85c89-aefd-4dcd-89d1-fa536242faad"
}
]
}
- Request:
url = "https://sticker-kit-horizon733.cloud.okteto.net/stickers_by_category?results_count=1&category_count=1"
headers = {"api_token": f"Bearer {your-api-token}"}
requests.post(url=url, headers=headers)
- Reponse:
{
"stickers": [
{
"category": "Hi",
"stickerResults": {
"items": [
{
"itemType": "SNAPCHAT_STICKERS",
"id": "Ab0LnHrGa3Iv",
"pngURL": "https://bolt-gcdn.sc-cdn.net/3/4mpR7vl6N2m7JJ01iwhVc?bo=EiIaABoAMgF9OgsEBQcNDxFydHZ3e0IGCPSm5usFSAJQB2AB&uc=7&appID=00f481a8-6716-4af7-ad1c-8a35cd6e00fb&sessionID=889a68a5-7ebc-4d84-9090-ffe1d949caf2",
"thumbnailURL": "https://bolt-gcdn.sc-cdn.net/3/4mpR7vl6N2m7JJ01iwhVc?bo=EiIaABoAMgF9OgsEBQcNDxFydHZ3e0IGCPSm5usFSAJQB2AB&uc=7&appID=00f481a8-6716-4af7-ad1c-8a35cd6e00fb&sessionID=889a68a5-7ebc-4d84-9090-ffe1d949caf2"
}
]
}
}
]
}
- Go to your app, your screen will look like below.
- Now, Click on Initial Version, Make sure
Enable
Sticker Kit. It will look like below
- Go back to Setup, and Scroll down, you will be able to
API Tokens
copy whichever you want to, make sure your App is in that Active on that Stage. API Token will look like below.
- Make sure to Read Code of Conduct.
- Help me to test it with every case, to check it works and doesn't crash.
- Update Code? Sure, If you find anything helpful to be added please. FYI: This is made just to simplify work of Developers of other languages.