A Go library for Snapchat's API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
srcli Cleaned up code using golint. Nov 11, 2015
.gitignore Cleaned up code using golint. Nov 11, 2015
.travis.yml changed to go 1.3. Nov 6, 2015
LICENSE Licensed under MIT License Oct 21, 2015
README.md fix special thanks Dec 24, 2015
ghost.go
ghost_test.go changed version and added some tests Nov 5, 2015
models.go Cleaned up code using golint. Nov 11, 2015

README.md

ghost

A Go library for Snapchat's API

Installation

$ go get github.com/neuegram/ghost

This library has been updated to keep up with Snapchat's changes. To use this library you need to signup to use the Casper API.

Register a casper account, and you can start using this library.

Warning

This library is in alpha at the moment, not everything has been tested (yet) but the basics still work. Feel free to contribute, this library is actively maintained and is making fast progress! :)

Use at your own risk.

Examples

Fetch all updates

package main

import (
	"fmt"
	"github.com/neuegram/ghost"
)

func main() {
	casperClient := ghost.NewRawCasperClient("yourapikey","yourapisecret")
	casperClient.Username = "yoursnapchatusername"
	casperClient.Password = "yoursnapchatpassword"
	casperClient.Debug = false
	snapchat := ghost.NewAccount("yourgmailaccount@gmail.com", "yourgmailpassword", casperClient, false)
	err := snapchat.Login()
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(snapchat.Updates())
}

Sending a Snap

package main

import (
	"fmt"
	"github.com/neuegram/ghost"
)

func main() {
	casperClient := ghost.NewRawCasperClient("yourapikey","yourapisecret")
	casperClient.Username = "yoursnapchatusername"
	casperClient.Password = "yoursnapchatpassword"
	casperClient.Debug = false
	snapchat := ghost.NewAccount("yourgmailaccount@gmail.com", "yourgmailpassword", casperClient, false)
	err := snapchat.Login()
	mediaID, err := snapchat.Upload("yoursnap.jpg")
	result, err := snapchat.Send(mediaID, []string{"teamsnapchat"}, 10)
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(result)
}

Snapchat Registration CLI

You can register a Snapchat account through the CLI.

Run $ go get github.com/neuegram/ghost/srcli

Run $ srcli -help for more details.

Special Thanks

If you would like to contribute, you can take a look at the documentation here and here.

Extra Special Thanks 💩

To whoever at Snapchat came up with this header:

“X-Snapchat-Notice: Snapchat Private APIs - Unauthorized use is prohibited.”

And to whoever at Snapchat came up with this message:

We've noticed that you're using a third-party application to access Snapchat, putting yourself (and possibly your friends) at risk. Please change your password and stop using third-party applications when you access Snapchat.

License

This project is licensed under the MIT license, see the LICENSE file for more details.