Who is signed in
GET
/me
const url = 'https://api.harperharbor.com/open/v1/me';const options = {method: 'GET', headers: {language: 'zh-Hant', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.harperharbor.com/open/v1/me \ --header 'Authorization: Bearer <token>' \ --header 'language: zh-Hant'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”language
required
string
UI locale. Accept-Language is not consulted.
Responses
Section titled “Responses”The public identity.
Media typeapplication/json
object
id
Public numeric user id. Never an internal UUID.
integer
nickname
string
Examplegenerated
{ "id": 1, "nickname": "example"}Authentication failed. Refresh the token; if refresh fails, request authorization again.
Media typeapplication/json
object
error
required
Machine-readable code. unauthorized means authentication failed. Refresh the token; if refresh fails, request authorization again.
string
message
required
One English sentence a client may show verbatim.
string
retryable
boolean
detail
Present on some 4xx errors with the offending part.
object
key
additional properties
any
Example
{ "error": "unauthorized"}