Newer Version Available

This content describes an older version of this product. View Latest

Building the Chatter REST API Resource URL

Access all Chatter REST API resources by using the URI for your company's instance, combined with version and community information, and the URI for the resource.

For example, building a URL without communities, if your instance is:
1https://na1.salesforce.com
And the version information is:
1/services/data/v35.0
And the resource is :
1/chatter/feeds/news/me/feed-elements
Put together, the full URL is:
1https://na1.salesforce.com/services/data/v35.0/chatter/
2feeds/news/me/feed-elements
To access resources that are part of a community, use the following after the version information and before the resource:
1/connect/communities/communityId
For example, this is a full URL that accesses a news feed resource in a community:
1https://na1.salesforce.com/services/data/v35.0/connect
2/communities/communityId/chatter/feeds/news/me/feed-elements
To access resources in the default community, use the internal shortcut as the community Id:
1/connect/communities/internal

You can use the internal shortcut even if communities are not enabled. You may want do this if you’re developing an application for multiple organizations and not all of them use communities.

The response bodies include URLs with /connect/communities/internal. This format enables you to perform string interpolation when referencing communities.

To access resources in the default community, you can also use the /chatter resources directly (without /connect/communities/internal). The response bodies don’t include URLs with /connect/communities/internal.

In addition, you can also use your organization’s custom URL for a community to access resources in it. For example:
1https://communitydomain.force.com/communitypath/services/data/v35.0/connect
2/communities/communityId/chatter/feeds/news/me/feed-elements