Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
snapchat
Advanced tools
Readme
This project is a node.js port of the excellent Objective-C SnapchatKit library by Tanner Bennett (ThePantsThief).
It provides an easy-to-use client interface to Snapchat's unofficial API, allowing Javascript developers to script Snapchat!
Most API methods are working and up-to-date with the current version of Snapchat, though there are some non-core methods which are untested. For example usage, please refer to the tests.
npm install snapchat
The main entrypoint is the Snapchat class. See the auto-generated documentation for a detailed API reference.
Snapchat defaults to using required signin credentials stored in environment variables:
SNAPCHAT_USERNAME
The Snapchat username to sign in with.SNAPCHAT_PASSWORD
The password to the Snapchat account to sign in with.SNAPCHAT_GMAIL_EMAIL
A valid GMail address.SNAPCHAT_GMAIL_PASSWORD
The password for the GMail address.var Snapchat = require('snapchat')
var client = new Snapchat()
// note the signIn will default to credentials stored in environment variables
client.signIn(function (err, session) {
if (!err) {
console.log('signed in', client.username)
}
})
Or with explicit credentials:
var Snapchat = require('snapchat')
var client = new Snapchat()
client.signIn('myusername', 'mypassword', 'mygmailaddress@gmail.com', 'mygmailpassword', function (err, session) {
if (!err) {
console.log('signed in', client.username)
}
})
NOTE Only Snapchat accounts created via an Android client should be used with this library. iOS accounts are handled separately by Snapchat, and your account will most likely be flagged / disabled as suspicious if you try to use a Snapchat account created on iOS.
NOTE Any valid gmail address and password may be used; it does not have to be the one the Snapchat user was created with.
See CONTRIBUTING.
You can enable debug logs by setting the DEBUG
environment variable:
DEBUG=snapchat; # debug core snapchat
OR
DEBUG=snapchat,snapchat:*; # debug all snapchat submodules
Travis Fischer | GitHub/fisch0920 | Twitter/@fisch0920 |
---|
Array[event]
and event
MIT. Copyright (c) Travis Fischer.
I believe it's 100% legal to use a "private" REST API and that there are no laws explicitly prohibiting the use of "private" REST APIs. However, this does not mean that the makers of these private APIs can't try to sue you under something overly-broad, such as the CFAA. I don't think Snapchat will, personally; in my experience they've only gone after developers for copyright disputes.
Disclaimer: The name "Snapchat" is a copyright of Snapchat™, Inc. This project is in no way affiliated with, sponsored, or endorsed by Snapchat™, Inc. I, the project owner and creator, am not responsible for any legalities that may arise in the use of this project. Use at your own risk.
FAQs
Nodejs client for the unofficial Snapchat API
The npm package snapchat receives a total of 8 weekly downloads. As such, snapchat popularity was classified as not popular.
We found that snapchat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.