Account


new Account(opts)

Snapchat wrapper for account-related API calls.

Parameters:
Name Type Description
opts Object
Source:

Methods


downloadAvatar(username, cb)

Downloads the animated avatar for user. Currently encrypted, or something.

Parameters:
Name Type Description
username string

The username tied to the avatar to download.

cb function
Source:

downloadSnaptag(cb)

Downloads your account's snaptag, a personal Snapchat QR code.

Parameters:
Name Type Description
cb function
Source:

updateBestFriendsCount(number, cb)

Updates the number of best friends to display.

Parameters:
Name Type Description
number number

A number from 3 to 7. Defaults to 3 and will max out at 7.

cb function
Source:

updateDisplayName(displayName, cb)

Updates your display name.

Your 'display name' is what your contact name defaults to when someone new adds you, not your username.

Parameters:
Name Type Description
displayName string

Your new display name.

cb function
Source:

updateEmail(address, cb)

Updates your account's email address.

Parameters:
Name Type Description
address string

Your new email address.

cb function
Source:

updateFeatureSettings(Object, cb)

Updates your account's feature settings.

See constants.Feature for valid keys. Invalid keys will be silently ignored.

Parameters:
Name Type Description
Object

settings A dictionary of string-boolean pairs. Missing keys-value pairs default to the current values. Behavior is undefined for values other than booleans.

cb function
Source:

updateNotificationSoundSetting(enableSound, cb)

Updates your 'notification sounds' preference.

Parameters:
Name Type Description
enableSound boolean

The new value for this preference.

cb function
Source:

updateSearchableByNumber(searchable, cb)

Updates whether your account can be found with your phone number.

Parameters:
Name Type Description
searchable boolean

The new value for this preference.

cb function
Source:

updateSnapPrivacy(privacy, cb)

Updates who can send you snaps.

Parameters:
Name Type Description
privacy

SnapPrivacy.Friends or SnapPrivacy.Everyone. Defaults to SnapPrivacy.Friends.

cb function
Source:

updateStoryPrivacy(privacy, friends, cb)

Updates who can see your stories. \e friends is only necessary when using StoryPrivacy.Custom.

Parameters:
Name Type Argument Description
privacy number

StoryPrivacy.Everyone, StoryPrivacy.Friends, StoryPrivacy.Custom.

friends Array.<string> <optional>

Optional list of strings of usernames to hide your stories from. Used only when privacy is StoryPrivacy.Custom.

cb function
Source:

updateTOSAgreementStatus(snapcash, snapcashV2, square, cb)

Updates your TOS agreement status for each of the three Terms of Service.

Parameters:
Name Type Description
snapcash boolean
snapcashV2 boolean
square boolean
cb function
Source:

uploadAvatar(images, cb)

Uploads a new animated avatar. Not working yet.

Parameters:
Name Type Description
images Array.<Buffer>

An array of 5 image Buffer objects.

cb function
Source: