{"_id":"56b517ac7bccae0d00e9a1ad","version":{"_id":"56acd71213ac890d001c3c7d","project":"56acd71213ac890d001c3c7a","__v":15,"createdAt":"2016-01-30T15:30:26.928Z","releaseDate":"2016-01-30T15:30:26.928Z","categories":["56acd71313ac890d001c3c7e","56acd8f113ac890d001c3c81","56acd8f95ac4060d0027865e","56acd93a13ac890d001c3c82","56ad20660ab3c00d00ce3347","56ad356a2a7860170013f714","56ad47eb0ab3c00d00ce334f","56afd523bc304a0d00ace1df","56b29a019621f20d00efb37e","56b657e11bc6970d009feee7","5845cc3c39950c1b002afe77","5845cde163c11b250037967e","5846efd45d064323007b17b4","588604da4674e32300efd160","588627882393d50f00f1322c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"56acd71213ac890d001c3c7a","user":"56acd6caa040860d00ac94a2","__v":1,"githubsync":"","category":{"_id":"56b29a019621f20d00efb37e","pages":["56b29a4965ddf50d0076baed","56b517ac7bccae0d00e9a1ad"],"project":"56acd71213ac890d001c3c7a","version":"56acd71213ac890d001c3c7d","__v":2,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-04T00:23:29.263Z","from_sync":false,"order":5,"slug":"subscriber-resource","title":"User Resource"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-05T21:44:12.820Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"var params = {\n  access_token: \"SUBSCRIBER_ACCESS_TOKEN\",\n  include: 'profile.picture'\n};\n\n$.getJSON('https://api.gamewisp.com/pub/v1/user/information/', params, function(json) {\n    console.log(json);\n});","language":"javascript"},{"code":"<?php\n\n$client = new GuzzleHttp\\Client();\n\ntry {\n\n  $response = $client->get('https://api.gamewisp.com/pub/v1/user/information', [\n    'query' => [\n      'access_token' => \"SUBSCRIBER_ACCESS_TOKEN\",\n      'include' => 'profile.picture'\n    ]\n  ]);\n\n  $result = $response->json();\n\n} catch (Exception $e) {\n\n  //error\n  $result = $e->getResponse()->json();\n\n}","language":"php"},{"language":"text","name":"Sample URL","code":"https://api.gamewisp.com/pub/v1/user/information?access_token=SUBSCRIBER_ACCESS_TOKEN&include=profile.picture"}]},"method":"get","results":{"codes":[{"name":"","code":"{\n  \"result\": {\n    \"status\": 1,\n    \"message\": \"User Retrieved\"\n  },\n  \"data\": {\n    \"id\": 5,\n    \"username\": \"test\",\n    \"banned\": false,\n    \"deactivated\": false,\n    \"created_at\": \"2015-11-30 00:00:00\",\n    \"links\": {\n      \"uri\": \"/user/5\"\n    },\n    \"profile\": {\n      \"data\": {\n        \"id\": 4,\n        \"user_id\": 5,\n        \"first_name\": \"Test\",\n        \"last_name\": \"User\",\n        \"description\": \"This is a user's profile description.\",\n        \"created_at\": \"2015-11-30 00:00:00\",\n        \"picture\": {\n          \"data\": {\n            \"id\": 16,\n            \"user_id\": \"5\",\n            \"description\": \"Asset content description\",\n            \"content\": {\n              \"base_url\": \"https://az650423.vo.msecnd.net/\",\n              \"images\": {\n                \"full\": {\n                  \"container\": \"profile-art\",\n                  \"blob\": \"profile_picture_43_14e2165c-ca35-4fe5-8d34-69e3bc42ca12.png\",\n                  \"type\": \"png\",\n                  \"size\": {\n                    \"height\": 128,\n                    \"width\": 128\n                  }\n                },\n                //...other image resolutions\n            },\n            \"created_at\": \"2015-12-01 12:00:00\"\n          }\n        }\n      }\n    }\n  }\n}","language":"json","status":200}]},"auth":"required","params":[{"_id":"56b517ac7bccae0d00e9a1af","ref":"","in":"query","required":true,"desc":"OAuth2 access token that identifies a GameWisp user","default":"","type":"string","name":"access_token"},{"_id":"56b517d1168b5c1700c15980","ref":"","in":"query","required":false,"desc":"Optional list of objects to include. Please see \"Include Parameters\" below.","default":"","type":"string","name":"include"}],"url":"/user/information"},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"user_read Scope Required\",\n  \"body\": \"This endpoint requires use of the [user_read scope](https://gamewisp.readme.io/docs/scopes). Be sure to request it when you generate access tokens.\"\n}\n[/block]\nThis endpoint returns basic user information, including their profile contents and their profile picture. Use this endpoint if you're wanting to implement \"Login with GameWisp\" style functionality and you want to leverage a GameWisp user's information to generate user accounts and profiles within your own application.\n\nThe profile picture object is a nested JSON structure that describes the various resolutions of profile pictures available. The basic structure is as follows:\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Please Respect our Bandwidth\",\n  \"body\": \"If you're going to make prolific use of images from GameWisp's servers, please download them and store them on your own servers as opposed to linking directly to our assets.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"full\\\": {\\n                  \\\"container\\\": \\\"profile-art\\\",\\n                  \\\"blob\\\": \\\"profile_picture_43_14e2165c-ca35-4fe5-8d34-69e3bc42ca12.png\\\",\\n                  \\\"type\\\": \\\"png\\\",\\n                  \\\"size\\\": {\\n                    \\\"height\\\": 128,\\n                    \\\"width\\\": 128\\n                  }\\n                },\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThere can be up to seven different resolutions of a profile picture available, including:\n\n* ```full``` - source image uploaded to GameWisp by the user\n* ```large``` - the source image processed to at least 800px wide.\n* ```large_sq``` - an 800x800px processed image, may be cropped depending on original aspect ratio.\n* ```medium``` - the source image processed to at least 300px wide.\n* ```medium_sq``` - an 300x300px processed image, may be cropped depending on original aspect ratio.\n* ```small``` - the source image processed to at least 100px wide.\n* ```small_sq``` - a 100x100px processed image, may be cropped depending on the original aspect ratio.\n\nThe path to an image stored on GameWisp's servers is:\n\n``` https://:base_url/:container/:blob ```\n\nFor example, using the above example JSON response the path to the source image of the user's avatar would be:\n\n``` https://az650423.vo.msecnd.net/profile-art/profile_picture_43_14e2165c-ca35-4fe5-8d34-69e3bc42ca12.png ```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Include Parameters\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"This endpoint has a nested include parameter\",\n  \"body\": \"The user's profile picture is a nested include parameter. To get it, pass in **profile.picture** for the ```include``` parameter\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"profile\",\n    \"0-1\": \"Get the basic user profile with the user object.\",\n    \"1-0\": \"profile.picture\",\n    \"1-1\": \"Get the profile object with a nested picture object that describes the user's profile picture.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]","excerpt":"Get basic information about a user.","slug":"userinformation","type":"endpoint","title":"/user/information"}

get/user/information

Get basic information about a user.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

access_token:
required
string
OAuth2 access token that identifies a GameWisp user
include:
string
Optional list of objects to include. Please see "Include Parameters" below.

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "user_read Scope Required", "body": "This endpoint requires use of the [user_read scope](https://gamewisp.readme.io/docs/scopes). Be sure to request it when you generate access tokens." } [/block] This endpoint returns basic user information, including their profile contents and their profile picture. Use this endpoint if you're wanting to implement "Login with GameWisp" style functionality and you want to leverage a GameWisp user's information to generate user accounts and profiles within your own application. The profile picture object is a nested JSON structure that describes the various resolutions of profile pictures available. The basic structure is as follows: [block:callout] { "type": "warning", "title": "Please Respect our Bandwidth", "body": "If you're going to make prolific use of images from GameWisp's servers, please download them and store them on your own servers as opposed to linking directly to our assets." } [/block] [block:code] { "codes": [ { "code": "\"full\": {\n \"container\": \"profile-art\",\n \"blob\": \"profile_picture_43_14e2165c-ca35-4fe5-8d34-69e3bc42ca12.png\",\n \"type\": \"png\",\n \"size\": {\n \"height\": 128,\n \"width\": 128\n }\n },", "language": "json" } ] } [/block] There can be up to seven different resolutions of a profile picture available, including: * ```full``` - source image uploaded to GameWisp by the user * ```large``` - the source image processed to at least 800px wide. * ```large_sq``` - an 800x800px processed image, may be cropped depending on original aspect ratio. * ```medium``` - the source image processed to at least 300px wide. * ```medium_sq``` - an 300x300px processed image, may be cropped depending on original aspect ratio. * ```small``` - the source image processed to at least 100px wide. * ```small_sq``` - a 100x100px processed image, may be cropped depending on the original aspect ratio. The path to an image stored on GameWisp's servers is: ``` https://:base_url/:container/:blob ``` For example, using the above example JSON response the path to the source image of the user's avatar would be: ``` https://az650423.vo.msecnd.net/profile-art/profile_picture_43_14e2165c-ca35-4fe5-8d34-69e3bc42ca12.png ``` [block:api-header] { "type": "basic", "title": "Include Parameters" } [/block] [block:callout] { "type": "info", "title": "This endpoint has a nested include parameter", "body": "The user's profile picture is a nested include parameter. To get it, pass in **profile.picture** for the ```include``` parameter" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "profile", "0-1": "Get the basic user profile with the user object.", "1-0": "profile.picture", "1-1": "Get the profile object with a nested picture object that describes the user's profile picture." }, "cols": 2, "rows": 2 } [/block]