{"__v":1,"_id":"5708213a13a3340e004e7058","category":{"__v":0,"_id":"5705b12221cfed0e00e8c580","project":"56abbf55f25f160d00e17f4e","version":"56abbf55f25f160d00e17f51","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-07T01:00:18.230Z","from_sync":false,"order":4,"slug":"server-side-api","title":"Server Side API"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"56abbf55f25f160d00e17f4e","user":"56abbec30b9e0b0d00616274","version":{"__v":12,"_id":"56abbf55f25f160d00e17f51","project":"56abbf55f25f160d00e17f4e","createdAt":"2016-01-29T19:36:53.665Z","releaseDate":"2016-01-29T19:36:53.665Z","categories":["56abbf56f25f160d00e17f52","56abca6bf9757e0d007c6650","56acddfa0ab3c00d00ce3332","56af65da9d32e30d0006d30f","56af66cab34d210d003d9ad0","56af6afcd21e9c0d00b628d1","56af6d6ecc4cbd0d00ce2c88","5705b12221cfed0e00e8c580","570a5676ade45d0e00c1ad33","570d7d25d1e4b82000d9e385","570eac3c3160d10e0041df0e","575709000fd6a3200010dded"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-08T21:23:06.291Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -XGET 'https://api.kongregate.com/api/user_info.json?username=ap_u2&friends=true'","language":"curl","name":"Request Info by Username"},{"code":"curl -XGET 'https://api.kongregate.com/api/user_info.json?user_ids=1,2'\n","language":"curl","name":"Request Info for Multiple User IDs"}]},"results":{"codes":[{"name":"Request Info by Username","code":"{\n  \"friends\": [\n    \"ap_u\",\n    \"KIXEYE\",\n    \"llbundle\",\n    \"anthony\",\n    \"ap_u1\"\n  ],\n  \"muted_users\": [],\n  \"friend_ids\": [\n    1047195,\n    5235025,\n    3903986,\n    2090,\n    20350241\n  ],\n  \"muted_user_ids\": [],\n  \"user_id\": 2295077,\n  \"username\": \"ap_u2\",\n  \"private\": false,\n  \"page_num\": 1,\n  \"num_pages\": 1,\n  \"success\": true,\n  \"user_vars\": {\n    \"username\": \"ap_u2\",\n    \"level\": 2,\n    \"points\": 101,\n    \"avatar_url\": \"https://cdn1.kongcdn.com/assets/avatars/defaults/bug.png?i10c=img.resize(width:50)\",\n    \"chat_avatar_url\": \"https://assets.kongregate.com/assets/avatars/defaults/bug.png?i10c=img.resize(width:16)\",\n    \"developer\": false,\n    \"moderator\": false,\n    \"admin\": false,\n    \"gender\": null,\n    \"age\": 31,\n    \"game_title\": \"Tom Clancy’s Endwar® Online\",\n    \"game_url\": \"http://www.kongregate.com/games/Ubisoft_Shanghai/tom-clancy-s-endwar-online\"\n  }\n}","language":"json","status":200},{"code":"{\n  \"success\": true,\n  \"users\": [\n    {\n      \"friends\": [],\n      \"muted_users\": [],\n      \"friend_ids\": [],\n      \"muted_user_ids\": [],\n      \"user_id\": 1,\n      \"username\": \"jimgreer\",\n      \"private\": false,\n      \"page_num\": 1,\n      \"num_pages\": 1,\n      \"success\": true,\n      \"user_vars\": {\n        \"username\": \"jimgreer\",\n        \"level\": 48,\n        \"points\": 15827,\n        \"avatar_url\": \"https://cdn1.kongcdn.com/user_avatars/0000/0001/1402337637.680815584717.png?i10c=img.resize(width:50)\",\n        \"chat_avatar_url\": \"https://assets.kongregate.com/user_avatars/0000/0001/avatar_atlas3_chat.png?i10c=img.resize(width:16)\",\n        \"developer\": true,\n        \"moderator\": true,\n        \"admin\": false,\n        \"gender\": \"Male\",\n        \"game_title\": \"Musaic Box\",\n        \"game_url\": \"http://www.kongregate.com/games/Badim/musaic-box\"\n      }\n    },\n    {\n      \"friends\": [],\n      \"muted_users\": [],\n      \"friend_ids\": [],\n      \"muted_user_ids\": [],\n      \"user_id\": 2,\n      \"username\": \"emily_greer\",\n      \"private\": false,\n      \"page_num\": 1,\n      \"num_pages\": 1,\n      \"success\": true,\n      \"user_vars\": {\n        \"username\": \"emily_greer\",\n        \"level\": 24,\n        \"points\": 3853,\n        \"avatar_url\": \"https://cdn4.kongcdn.com/user_avatars/0000/0002/LegendsofKongEmily.png?i10c=img.resize(width:50)\",\n        \"chat_avatar_url\": \"https://assets.kongregate.com/user_avatars/0000/0002/Anex_chat.png?i10c=img.resize(width:16)\",\n        \"developer\": false,\n        \"moderator\": true,\n        \"admin\": true,\n        \"gender\": \"Female\",\n        \"age\": 41,\n        \"game_title\": \"Endless Boss Fight\",\n        \"game_url\": \"http://www.kongregate.com/games/WhiteMilkGames/endless-boss-fight\"\n      }\n    }\n  ]\n}","language":"text","status":200,"name":"Request Info for Multiple User IDs"}]},"settings":"5707e879cfc0992200c2a419","auth":"required","params":[{"_id":"570821ae447c410e00221afa","ref":"","in":"query","required":false,"desc":"Username to retrieve information about","default":"","type":"string","name":"username"},{"_id":"570821ae447c410e00221af9","ref":"","in":"query","required":false,"desc":"User ID of user to retrieve information about","default":"","type":"int","name":"user_id"},{"_id":"570821ae447c410e00221af8","ref":"","in":"query","required":false,"desc":"Comma-delimited list of users to retrieve information about (max 50)","default":"","type":"string","name":"usernames"},{"_id":"570821ae447c410e00221af7","ref":"","in":"query","required":false,"desc":"Comma-delimited list of users IDs to retrieve information about (max 50)","default":"","type":"string","name":"user_ids"},{"_id":"570821ae447c410e00221af6","ref":"","in":"query","required":false,"desc":"Page number to retrieve","default":"1","type":"int","name":"page_num"},{"_id":"570821ae447c410e00221af5","ref":"","in":"query","required":false,"desc":"Indicates whether or not to include the friends list. Only supported when requesting information about a single user.","default":"false","type":"boolean","name":"friends"}],"url":"/user_info.json"},"isReference":true,"order":17,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"If you are intending to load lots of user information (for example, loading the avatar URLs for all of a user's friends), you should use the multiple id/username version of the request to avoid long load times or timeouts due to making lots of requests. These group requests can be done with up to 50 user IDs or usernames at a time. The friends flag is **not** supported when requesting multiple records.\"\n}\n[/block]","excerpt":"Retrieve information about Kongregate users","slug":"server-api-user-info","type":"get","title":"User Information"}

getUser Information

Retrieve information about Kongregate users

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

username:
string
Username to retrieve information about
user_id:
integer
User ID of user to retrieve information about
usernames:
string
Comma-delimited list of users to retrieve information about (max 50)
user_ids:
string
Comma-delimited list of users IDs to retrieve information about (max 50)
page_num:
integer1
Page number to retrieve
friends:
booleanfalse
Indicates whether or not to include the friends list. Only supported when requesting information about a single user.

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "Note", "body": "If you are intending to load lots of user information (for example, loading the avatar URLs for all of a user's friends), you should use the multiple id/username version of the request to avoid long load times or timeouts due to making lots of requests. These group requests can be done with up to 50 user IDs or usernames at a time. The friends flag is **not** supported when requesting multiple records." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}