{"_id":"5705b150ad5e9d0e0059c202","editedParams":true,"editedParams2":true,"user":"56abbec30b9e0b0d00616274","__v":3,"parentDoc":null,"category":{"_id":"5705b12221cfed0e00e8c580","project":"56abbf55f25f160d00e17f4e","__v":0,"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"},"project":"56abbf55f25f160d00e17f4e","version":{"_id":"56abbf55f25f160d00e17f51","project":"56abbf55f25f160d00e17f4e","__v":12,"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-07T01:01:04.117Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -XGET -d '{\n  \"api_key\": \"GAMEAPIKEY\",\n  \"user_id\": 1480702,\n  \"game_auth_token\": \"GAMEAUTHTOKEN\"\n}' 'https://api.kongregate.com/api/authenticate.json'","name":"Success","language":"curl"},{"language":"curl","code":"curl -XGET -H \"Content-type: application/json\" -d '{\n  \"api_key\": \"BADKEY\",\n  \"user_id\": 1480702,\n  \"game_auth_token\": \"GAMEAUTHTOKEN\"\n}' 'https://api.kongregate.com/api/authenticate.json'","name":"Invalid Credentials"},{"code":"curl -XGET -H \"Content-type: application/json\" -d '{\n  \"user_id\": 1480702\n}' 'https://api.kongregate.com/api/authenticate.json'","language":"curl","name":"Bad Parameters"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"success\": true,\n  \"username\": \"LordSmatchington\",\n  \"user_id\": 1480702\n}","name":"Success"},{"code":"{\n  \"success\": false,\n  \"error\": 403,\n  \"error_description\": \"Invalid credentials\"\n}","language":"json","status":200,"name":"Invalid Credentials"},{"code":"{\n  \"success\": false,\n  \"error\": 400,\n  \"error_description\": \"user_id, game_auth_token, and api_key are required parameters\"\n}","name":"Bad Parameters","status":200,"language":"json"}]},"settings":"5707e879cfc0992200c2a419","auth":"required","params":[{"_id":"5705b1c0e2df830e00d526f5","ref":"","in":"query","required":true,"desc":"Kongregate User ID","default":"","type":"int","name":"user_id"},{"_id":"5705b1c0e2df830e00d526f4","ref":"","in":"query","required":true,"desc":"Game Authentication Token","default":"","type":"string","name":"game_auth_token"},{"_id":"5705b1c0e2df830e00d526f3","ref":"","in":"query","required":true,"desc":"Your Private API Key","default":"","type":"string","name":"api_key"}],"url":"/authenticate.json"},"isReference":true,"order":0,"body":"The Authentication API allows Kongregate players to play any game without registering or entering a password. By making a call to the web service from your game server you can securely determine the player's Kongregate user id and username.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"This method should only be called from a server, not a game client.\"\n}\n[/block]\nFor more information on how Kongregate users should be authenticated in your game, see [this document](doc:concepts-authentication).","excerpt":"Verifies a user's identity","slug":"server-api-authenticate","type":"endpoint","title":"Authenticate"}

getAuthenticate

Verifies a user's identity

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

user_id:
required
integer
Kongregate User ID
game_auth_token:
required
string
Game Authentication Token
api_key:
required
string
Your Private API Key

Examples


Result Format


Documentation

The Authentication API allows Kongregate players to play any game without registering or entering a password. By making a call to the web service from your game server you can securely determine the player's Kongregate user id and username. [block:callout] { "type": "info", "title": "Note", "body": "This method should only be called from a server, not a game client." } [/block] For more information on how Kongregate users should be authenticated in your game, see [this document](doc:concepts-authentication).

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 }}