User Activity History (legacy)
Request Details
Item | Value |
Description | Returns the list of activities a user has completed. |
Method | GET |
Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/users/[user_id]/activity_history?api_key=[api_key]&id_type=[id_type] |
Request
Field Name | Sample Value | Required | Format | Description |
URL PARAMETERS | ||||
user_id | alice@crowdtwist.com | Yes | String | Unique ID of the user for whom activities will be returned: Options: – Email Address – Facebook User ID – Twitter User ID – CrowdTwist ID – Third Party ID – Username – Mobile Phone Number |
QUERY STRING PARAMETERS | ||||
api_key | QWERTYUIOP | Yes | String | |
id_type | No | String | Type of ID being Sent: Options: – facebook_user_id – twitter_user_id – id (CrowdTwist ID) – default ID if id_type is not specified – third_party_id – username – mobile_phone_number |
|
page_size | 10 | No | Integer | If using pagination in request, the number of items per page. Note: if used, must be used with page_number |
page_number | 1 | No | Integer | If using pagination in request, the page number to be returned. Note: if used, must be used with page_size |
Response
Response Body
Field Name | Sample Value | Required | Format | Description |
activity_id | 225 | Yes | String | CrowdTwist internal ID for activity. |
date_created | 1425404945 | Yes | String | Date activity was recorded. |
date_awarded | 1425404945 | Yes | String | Date activity was awarded. |
name | 225 | Shared a link | String | Name of activity. |
num_points | 1000 | Yes | Integer | Points earned for completing activity. |
show_as_locked_by_tier | 1 | Yes | Boolean | |
min_tier_id | 1 | No | Integer | Minimum user tier to complete activity |
extra_data | { “url”: “http://www.someurl.com/shared.html”, “message”: “Check this out!”, “email”: “person@email.com” } |
No | JSON | Extra data set via User Activity Credit API. |
Error Response
Field Name | Sample Value | Required | Format | Description |
error | param_error | Yes | String | A machine readable code that describes the error. |
message | Missing the user_id parameter | Yes | String | A short, descriptive sentence detailing the error. |
Error Response Codes
Error | Message |
input_error | The input provided in invalid or formatted incorrectly. |
internal_error | Something went wrong on our end. |
param_error | A missing or invalid parameter is included in the request. |
page_not_found | The requested page does not exist or has been removed. |
Samples
Sample Request Body
Sample Response Body
Sample Error Response