User Profile


Request Details

Item Value
Description Returns user profile for a given member.
Method GET
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


Successful Response

Field Name Sample Value Required Format Description
id 16 Yes String Internal CrowdTwist member user_id
first_name Alice Yes Integer Internal CrowdTwist User firstname
middle_name null Yes Integer Internal CrowdTwist User middle name
last_name Twist Yes Integer User lastname
date_of_birth null User DOB
email_address alice@crowdtwist.com Yes String User email
email_is_verified true Yes Integer User email is verified
username Alice Yes String User username
mobile_phone_number null No Integer User phone number
third_party_id null Yes String User Third party ID
is_active true Yes User is active
gender_id null Yes Gender ID
gender null Yes Gender mentioned
extra_data null No Extra data provided
continent North America Yes String Continent provided
country United States Yes String Country provided
us_region Northeast No String US region provided
ca_province null No String CA province provided
state NY Yes String State provided
city New York City Yes String City provided
street_address_1 null No String Street-1
street_address_2 null No String Street-2
postal_code 10001 Yes Integer Postal code provided
receive_email_updates false No String Email Updates
date_receive_email_opt_in null No String Date of receive email IN
date_receive_email_opt_out null No String Date of
receive email OUT
total_points 1000 Integer Total points of the user
redeemable_points 1000 Integer Redeemable points of the user
num_points_purchased 0 No Integer Num points purchased
facebook_access_token Null No Facebook access token
facebook_user_id Null No Facebook user Id
date_fb_token_expires Null No FB token expires
twitter_oauth_token Null No Twitter oauth token
twitter_oauth_token_secret Null No Twitter oauth token secret
google_access_token Null No Google access token
google_refresh_token Null No Google refresh token
google_user_id Null No Google user ID
yahoo_access_token Null No Yahoo access token
yahoo_access_token_secret Null No Yahoo access token secret
yahoo_session_handle Null No Yahoo session handle
yahoo_user_id Null No Yahoo session ID for the user
activity_stream_opt_in Null No Activity streem
store_id Null No Store ID
date_last_login 1460787298 No Last date login
date_last_updated 1460787301 No Last date updated
date_created 1460787285 No Created date
rank Null No Rank of the user
weekly_rank Null No Weekly rank of the user
monthly_rank Null No Monthly rank of the user
salt Null No Salt
hash_algorithm_id 1 No Hash algorithm ID for the user
lang_pref en No Language preference of the user
referral_url http://program.crowdtwist.com?_cts_=gD2S1W8P No Referral URL
fan_level New Fan Yes Fan level of the User
sign_up_channel_id 1 No Channel id of user sign-up
custom_data JSON Object:
{
“register_id” : “1”,
“cashier_id” : “2”}
}
No Custom Data JSON object (parameters are configurable by client)


Error Response

Field Name Sample Value Required Format Description
error param_error Yes String A machine readable code that describes the error.
message User does not exist 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 GET
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/?api_key=QWERTYUIOP&id_type=email
curl -X GET
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/?api_key=QWERTYUIOP&id_type=email


Sample Successful Response: Status Code 200

{
  "id": 11601,
  "first_name": "Alice",
  "middle_name": null,
  "last_name": "Twist",
  "date_of_birth": null,
  "email_address": "alice@crowdtwist.com",
  "email_is_verified": true,
  "username": "alicetwist",
  "mobile_phone_number": null,
  "third_party_id": null,
  "is_active": true,
  "gender_id": null,
  "gender": null, 
  "extra_data": null,
  "continent": "North America",
  "country": "United States",
  "us_region": "Northeast",
  "ca_province": null,
  "state": "NY",
  "city": "New York City",
  "street_address_1": null,
  "street_address_2": null,
  "postal_code": "10010",
  "receive_email_updates": true,
  "date_receive_email_opt_in": 1461706842,
  "date_receive_email_opt_out": null,
  "total_points": 2000,
  "redeemable_points": 2000,
  "num_points_purchased": 0,
  "facebook_access_token": null,
  "facebook_user_id": null,
  "date_fb_token_expires": null,
  "twitter_oauth_token": null,
  "twitter_oauth_token_secret": null,
  "google_access_token": null,
  "google_refresh_token": null,
  "google_user_id": null,
  "yahoo_access_token": null,
  "yahoo_access_token_secret": null,
  "yahoo_session_handle": null,
  "yahoo_user_id": null,
  "activity_stream_opt_in": true,
  "store_id": null,
  "date_last_login": null,
  "date_last_updated": 1461777590,
  "date_created": 1461706842,
  "rank": null,
  "weekly_rank": null,
  "monthly_rank": null,
  "salt": null,
  "hash_algorithm_id": "1",
  "lang_pref": "en",
  "referral_url": "",
  "fan_level": "Bronze",
  "sign_up_channel_id" : 1, 
  "custom_data": {
      "register_id" : "1",
      "cashier_id" : "2"}
}
{
  "id": 11601,
  "first_name": "Alice",
  "middle_name": null,
  "last_name": "Twist",
  "date_of_birth": null,
  "email_address": "alice@crowdtwist.com",
  "email_is_verified": true,
  "username": "alicetwist",
  "mobile_phone_number": null,
  "third_party_id": null,
  "is_active": true,
  "gender_id": null,
  "gender": null, 
  "extra_data": null,
  "continent": "North America",
  "country": "United States",
  "us_region": "Northeast",
  "ca_province": null,
  "state": "NY",
  "city": "New York City",
  "street_address_1": null,
  "street_address_2": null,
  "postal_code": "10010",
  "receive_email_updates": true,
  "date_receive_email_opt_in": 1461706842,
  "date_receive_email_opt_out": null,
  "total_points": 2000,
  "redeemable_points": 2000,
  "num_points_purchased": 0,
  "facebook_access_token": null,
  "facebook_user_id": null,
  "date_fb_token_expires": null,
  "twitter_oauth_token": null,
  "twitter_oauth_token_secret": null,
  "google_access_token": null,
  "google_refresh_token": null,
  "google_user_id": null,
  "yahoo_access_token": null,
  "yahoo_access_token_secret": null,
  "yahoo_session_handle": null,
  "yahoo_user_id": null,
  "activity_stream_opt_in": true,
  "store_id": null,
  "date_last_login": null,
  "date_last_updated": 1461777590,
  "date_created": 1461706842,
  "rank": null,
  "weekly_rank": null,
  "monthly_rank": null,
  "salt": null,
  "hash_algorithm_id": "1",
  "lang_pref": "en",
  "referral_url": "",
  "fan_level": "Bronze",
  "sign_up_channel_id" : 1, 
  "custom_data": {
      "register_id" : "1",
      "cashier_id" : "2"}
}

Sample Error Response: Status Code 400

{
   "error": "page_not_found",
   "message": "user does not exist."
}
{
   "error": "page_not_found",
   "message": "user does not exist."
}