Appearance
Users API
This document describes the APIs of Aspecta for users.
Get User
Get self information of a user
Endpoint
Request
No additional parameters required. We will use the access token to identify the user. The following snippet shows a sample request:
httpPOST /token HTTP/1.1 Host: https://api.aspecta.ai/v1/users/me Content-Type: application/x-www-form-urlencoded Authorization: Bearer 7/Lvq3XoJkU1oNz8A82v3b6T2ICURL Example
bashcurl -H "Authorization: Bearer 7/Lvq3XoJkU1oNz8A82v3b6T2I" https://api.aspecta.ai/v1/users/meResponse
Field Description user_idintThe id of the user which is unique and immutable in AspectausernamestringThe name of the user which is unique in Aspectaprofile_urlstringThe url of the usernicknamestringThe nick name of the useravatarstringThe url of the user's avatarintroductionstringThe introduction of the userThe following snippet shows a sample response:
json{ "user_id": 18, "username": "jack", "profile_url": "https://aspecta.ai/u/jack", "nickname": "Jack Aspecta", "avatar": "https://storage.googleapis.com/storage-aspecta-id/resources/avatar/production/avatar-18.png", "introduction": "hello world" }Errors
Error Code invalid_userinvalid_token