Welcome! Here you’ll find the public documentation of the Socialize API. You can use this API in order to integrate Socialize functionality into your apps. This API is currently used in the apps built through AppMakr with Socialize enabled.
Natural pagination uses first and last fields to specify a range for pagination. First is included, and last is excluded.
Dynamic pagination is achieved using limiting_id and limit. Response will return n items (when n = limit) whose id is less than limiting_id; the limiting_id is not included in the response. Resultset is ordered by id, descending.
Default values:
first=0last=100limiting_id=nulllimit=100
Note
Each request is limited to 100 items.
If first = 0, last = 50, the API returns shares 0-49.
If last - first > 100, then last is truncated to equal first + 100. For example, if first = 100, last = 250, then last is changed to last = 200.
If only last = 150 is passed, then last is truncated to 100. If last = 25, then results 0...24 are returned.
A API User Object will always be created if this is request is made without OAuth headers and third-party credentials.
Third party authentication accepts credentials for the following two providers. The index is what needs to be passed in for the auth_type parameter.
[1] Facebook
[2] Twitter
Third Party Authentication uses a service such as Facebook to verify the user.
Using third party authentication allows the user to maintain a profile that is linked to their activity.
Without using Third Party Authentication, the user will still be able to access socialize features but these actions will not be linked to the user’s profile.
If third-party credentials and OAuth headers are provided, the User Object in the response may point to a different user if the third-party credentials already exist and are associated with another device or user. At this time there is no way to resolve this conflict.
If third-party credentials and OAuth headers are provided, and a different set of credentials already exist, the credentials will be updated.
Count of items associated with this entity. This is only returned for GET requests.
Note
If entity_key is not provided then all activities associated with the application are returned. This could be a very expensive operation and should not be used unless absolutely needed.
Any one activity can be fetched by GET-ing a URL of the form:
A mean to get a list of short urls when pushing a message to third party via the SDK. The list of urls in added to PropagationInfoRequest Object object inside each activity object.
share_location
Boolean
✗
✗
Whether to share location with others. Defaults to True
subscribe
Boolean
✗
✗
Whether to subscribe to notifications for this entity. Defaults to null
A mean to get a list of short urls when pushing a message to third party via the SDK. The list of urls in added to PropagationInfoRequest Object object inside each activity object.
share_location
Boolean
✗
✗
Whether to share location with others. Defaults to True
A mean to get a list of short urls when pushing a message to third party via the SDK. The list of urls in added to PropagationInfoRequest Object object inside each activity object.
share_location
Boolean
✗
✗
Whether to share location with others. Defaults to True
text
String
✓
✗
Text content of the share.
Note
The medium parameter can have one of the following values:
A mean to get a list of short urls when pushing a message to third party via the SDK. The list of urls in added to PropagationInfoRequest Object object inside each activity object.
share_location
Boolean
✗
✗
Whether to share location with others. Defaults to True
Count of items associated with this entity. This is only returned for GET requests.
Note
In case multiple activities are requested using the activity endpoint each object will also have an activity_type field which can be one of comment, share, like
Examples
Request: get the latest 100 activities by the user’s id:
GET/v1/user/123/activity/
Request: get the latest 10 activities by the user’s id:
GET/v1/user/123/activity/?last=10
Request: get the latest 100 likes by the user’s id:
GET/v1/user/123/like/
Request: get the latest 10 likes by the user’s id:
GET/v1/user/123/like/?last=10
Request: delete a like by the user’s id and entity_key:
This endpoint is used to dis-associate a third-party account with the Socialize user. This is to be used when a user tries to associate a third-party account and the API server returns a different user object than the user who sent the request.
This request needs to be signed with the credentials of the old user associated with the third-party account.
Third party authentication accepts credentials for the following two providers. The index is what needs to be passed in for the auth_type parameter.
Socialize API Documentation¶
Welcome! Here you’ll find the public documentation of the Socialize API. You can use this API in order to integrate Socialize functionality into your apps. This API is currently used in the apps built through AppMakr with Socialize enabled.
Base URL¶
All URLs referenced in the documentation have the following base:
Common Features¶
Detailed descriptions of OAuth headers can be found here.
Required Headers¶
The following headers are required unless otherwise specified in the service description.
Optional Headers¶
Request Details¶
All requests use http except for the Authentication request, which uses https.
Post request uses the following Content-Type header:
All response bodies are in json format.
Note
Pagination¶
These fields are optional.
Natural pagination uses first and last fields to specify a range for pagination. First is included, and last is excluded.
Dynamic pagination is achieved using limiting_id and limit. Response will return n items (when n = limit) whose id is less than limiting_id; the limiting_id is not included in the response. Resultset is ordered by id, descending.
Default values:
Note
API¶
Authentication¶
Note
A API User Object will always be created if this is request is made without OAuth headers and third-party credentials.
Third party authentication accepts credentials for the following two providers. The index is what needs to be passed in for the auth_type parameter.
Third Party Authentication uses a service such as Facebook to verify the user.
Request Default authentication request
Request Authentication request with third party tokens (twitter)
Response
{ “oauth_token”: <str>, “oauth_token_secret”: <str>, “user”: <User Object> }Application¶
Entity¶
Any one entity can be fetched by GET-ing a URL of the form:
Making such a request will return one object of the requested entity. Details about the objects are specified in Request/Response Objects.
Note
Request
Response jobs
Note
Request GET latest 100 entities in the application
Request Get entities by specific entity IDs
Request GET an entity by a key
Request GET entities by keys sorted by total activity
Response
{ “items”: [ <Full Entity Object> ], “errors”: [ <Error Object> ] }Entity Activities¶
Activities can be of four types:
Fetching Activities¶
To get all activities associated with any given entity you can use the activity endpoint.
Note
Any one activity can be fetched by GET-ing a URL of the form:
Making such a request will return one object of the requested activity type. Details about the objects are specified in Request/Response Objects.
Request
Response
Request
Response
Request :: Get likes based on an entity key
Response
{ “items”: [ <Like Object> ], “errors”: [ <Error Object> ], }Request :: Get comments based on an entity key
Response
{ “items”: [ <Comment Object> ], “errors”: [ <Error Object> ], }Deleting Activities¶
Any one activity can be deleted by DELETE-ing a URL of the form:
Examples
Note
Comment¶
Note
Request GET last 100 comments for an application.
Request GET comments by specific comment IDs
Request GET 25 comments for an entity using range.
Request POST a comment for an existing entity
Request POST a comment and create or update and entity
Response
{ “items”: [ <Comment Object> ], “errors”: [ <Error Object> ], “total_count”: <int - only for GET> }Like¶
Note
Request GET last 100 likes for an application.
Request GET likes by specific like IDs
Request GET 25 likes for an entity using range.
Request POST a like for an existing entity
Request POST a like and create or update and entity
Response
{ “items”: [ <Like Object> ], “errors”: [ <Error Object> ], “total_count”: <int - only for GET> }Share¶
Note
The medium parameter can have one of the following values:
Note
Request GET last 100 shares for an application.
Request GET shares by specific share IDs
Request GET 25 shares for an entity using range.
Request POST a share for an existing entity
Request POST a share and create or update and entity
Response
{ “items”: [ <Share Object> ], “errors”: [ <Error Object> ], “total_count”: <int - only for GET> }View¶
Note
Request GET last 100 views for an application.
Request GET views by specific view IDs
Request GET 25 views for an entity using range.
Request POST a view for an existing entity
Request POST a view and create or update and entity
Response
{ “items”: [ <View Object> ], “errors”: [ <Error Object> ], “total_count”: <int - only for GET> }User¶
Fetching Users¶
Note
Request GET last 100 users for an application.
Request GET users by specific user IDs
Activities¶
Note
Request: get the latest 100 activities by the user’s id:
Request: get the latest 10 activities by the user’s id:
Request: get the latest 100 likes by the user’s id:
Request: get the latest 10 likes by the user’s id:
Request: delete a like by the user’s id and entity_key:
Request: get the latest 100 comments by the user’s id:
Request: get the latest 100 shares by the user’s id:
Request: get the latest 100 views by the user’s id:
Response
Devices¶
Note
Request Associate an Apple device token with a user
[ { "device_token": "26fb2d4ffb8594883d89f827162036e4fea7e02fe1f18256b27717f03cdefa98", "device_type: "iOS", } ]Request Associate an android device token with a user and set quite time between 9pm to 7am GMT:
[ { "c2dm_registration_id": "APA91bFt0CDXzlUueWZACY-nKHWDp...KTVZyb99B313QLIzch5eZiR64rRkzpciTg", "device_type: "Android", } ]Response
{ “items”: [ <DeviceToken Object> ], “errors”: [ <Error Object> ], }Subscriptions¶
Note
The type parameter can have one of the following values:
Request latest 100 subscriptions of the user:
Request by a key and a range
Request subscribe a user for notifications about an entity:
Request unsubscribe a user from notifications to an entity:
Response
{ “items”: [ <Subscription Object> ], “errors”: [ <Error Object> ], }Device Token¶
Request Check for multiple device tokens
Response
{ “002861827E7EB5CE7035B7C9F23F473D”: <DeviceToken Object or null>, “002861827E7EB5CE7035B7C9F23F473E”: <DeviceToken Object or null>, }Utility¶
URL Shortener¶
Request shorten a url:
Third-Party Accounts¶
Note
This endpoint is used to dis-associate a third-party account with the Socialize user. This is to be used when a user tries to associate a third-party account and the API server returns a different user object than the user who sent the request.
This request needs to be signed with the credentials of the old user associated with the third-party account.
Third party authentication accepts credentials for the following two providers. The index is what needs to be passed in for the auth_type parameter.
Request To delete a third-party association
Request/Response Objects¶
All types of parameters or return values are indicated as <TYPE>.