Skip to main content

('The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools.',)

Project description

The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools (



$ easy_install chatter

Even better:

$ pip install chatter

Chatter API overview

See this quickstart tutorial: from Salesforce.



client_id = “YOUR_CHATTER_CLIENT_ID” client_secret = “YOUR_CHATTER_CLIENT_SECRET” auth = chatter.ChatterAuth(client_id, client_secret)

instance_url = “YOUR_USER_INSTANCE_URL” access_token = “YOUR_USER_ACCESS_TOKEN” refresh_token = “YOUR_USER_REFRESH_TOKEN”

chatter = chatter.Chatter(auth=auth, instance_url=instance_url,
access_token=access_token, refresh_token=refresh_token)

Get authenticated user’s details:

me =

Note ‘GET’ is implied, so you can reduce the above to:

me =

Get another user’s details

other_user = chatter.users[“005E0000000FpoxIAC”].get()

Again, this can be reduced:

other_user = chatter.users[“005E0000000FpoxIAC”]()

Another way to achieve this, using the ‘_’ magic method:

other_user = chatter.users._(“005E0000000FpoxIAC”).get()

Updating the authenticated user’s Chatter status:”Hello world!”)

Occassionally it is necessary to refresh the user’s access token, due to session expiration. The underlying ChatterCall class will handle this automatically, however you may wish to be notified of access token changes so you can reflect this in your user model.

It’s possible to do this via the access_token_refreshed_callback, pass in a callable, and your callback will get called with the refreshed access token.


def my_callback(access_token):
print “New access_token”, access_token
chatter = chatter.Chatter(auth=auth, instance_url=instance_url,
access_token=access_token, refresh_token=refresh_token, access_token_refreshed_callback=my_callback)

The rest is hopefully self-explanatory! :)


Send feedback / questions etc. to:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for chatter, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size chatter-0.1.2.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page