User Activity Credit


Request Details

Item Value
Description Attempts to award the user points for the given Activity. Due to frequency capping limits and other factors, points may not actually be awarded if the user is not able to earn them at the time of the request. Also note that Activity awards are queued up; this response indicates that we will process the request to award points, generally within seconds.
Method POST
Endpoint https://api.crowdtwist.com/v2/users/[user_id]/activities?api_key=[api_key]&id_type=[id_type]


Request

Field Name Sample Value Required Format Notes
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 email No String Type of ID being Sent:
Options:
– email
– facebook_user_id
– twitter_user_id
– id (CrowdTwist ID) – default ID if id_type is not specified
– third_party_id
– username
– mobile_phone_number
REQUEST BODY
Field Name Sample Value Required Format Notes
activity_id 410052775 Yes String Internal CrowdTwist activity id.


Successful Response

Field Name Sample Value Required Format Description
awarded true Yes String A short, descriptive sentence detailing the status.


Error Response

Field Name Sample Value Required Format Description
error page_not_found Yes String A machine readable code that describes the error.
message 4100527756 is not a valid activity 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.
page_not_found The requested page does not exist or has been removed.


Sample Request

curl -X POST
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/activities?api_key=QWERTYUIOP&id_type=email
curl -X POST
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/activities?api_key=QWERTYUIOP&id_type=email


Sample Successful Response: Status Code 200

{
  "awarded": true
}
{
  "awarded": true
}

Sample Error Response: Status Code 400

{
  "error": "page_not_found",
  "message": "4100527756 is not a valid activity"
}
{
  "error": "page_not_found",
  "message": "4100527756 is not a valid activity"
}