This repository has been archived by the owner on Dec 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Snap API Documentation
mgp25 edited this page Mar 9, 2015
·
11 revisions
Not updated yet
$username = ""; // Your snapchat username
$password = ""; // Your snapchat password
$debug = false; // Set this to true if you want to see all outgoing requests and responses from server
$snapchat = new Snapchat($username, $auth_token, $debug);
//Login to Snapchat with your username and password
$snapchat->login($username, $password);
If you want to use an existing session, for example your mobile device session (so you don't need to login again), you need to set $auth_token
, you can capture that token from your device using any proxy.
$imagePath = ""; // URL or local path to a media file (image or video)
$sendTo = array(); // Single or multiple recipients
// Send snap adding text to your image and 10 seconds
$snapchat->send($imagePath, $sendTo, "this is a test :D", 10);
Remember that videos must be less or equal 10 seconds duration.
$imagePath = ""; // URL or local path to a media file (image or video)
$snapchat->setStory($imagePath);
You can also set a text to the image story.
$snapchat->setStory($imagePath, $time, $text);
$friends = $snapchat->getFriends();
// Get snaps data
$snapchat->getSnaps();
// Automatically downloads Snaps and store it in 'snaps' folder
$snapchat->getSnaps(true);
// Get stories data
$snapchat->getFriendStories();
// Automatically downloads Snaps and store it in 'stories' folder
$snapchat->getFriendStories(true);
$snapchat->addFriend($username);
$snapchat->deleteFriend($username);
Thanks to all the community for making this possible, we'll keep with the good work :)