Retrieve account information
December 2023
Table of contents
https://api.useapi.net/v2/account
Request Headers
Authorization: Bearer {API token}
API token
is required, see Setup useapi.net for details.
Responses
-
{ "email": "[email protected]", "created": "2023-08-316T21:03:28.558Z", "name": "Your Name", "verified": "2023-08-316T21:05:17.137Z", "sub": "230831", "replyUrl": "Call back URL here" }
-
{ "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
email: string,
created: string, // YYYY-MM-DDTHH:mm:ss.sssZ, IS0 8601, UTC
name: string,
verified: string, // YYYY-MM-DDTHH:mm:ss.sssZ, IS0 8601, UTC
sub: string, // YYMMDD
replyUrl: string,
error: string,
errorDetails: string,
code: number
}
Examples
-
curl https://api.useapi.net/v2/account \ -H "Accept: application/json" \ -H "Authorization: Bearer …"
-
const token = "API token"; const apiUrl = "https://api.useapi.net/v2/account"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result});
-
import requests token = "API token" apiUrl = "https://api.useapi.net/v2/account" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())