Retrieve PixVerse API account configuration for email
December 6, 2024
Table of contents
https://api.useapi.net/v2/pixverse/accounts/
The email
value should correspond to an account configured previously via a POST /accounts/email
request.
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API token
is required, see Setup useapi.net for details.
Responses
-
{ "email": "<account email>", "password": "…secured…", "maxJobs": 3, "jwt": { "AccountId": 66778899, "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z", "Username": "<username>", "token": "abc…secured…cde" } }
-
{ "error": "Unauthorized", "code": 401 }
-
Configuration not found. To create configuration use POST /accounts/
email
.
Model
{ // TypeScript, all fields are optional
email: string
password: string
maxJobs: number
jwt: {
AccountId: number
ExpireTime: number
ExpireTimeUTC: string
Username: string
token: string
}
}
Examples
-
curl https://api.useapi.net/v2/pixverse/accounts/<email> \ -H "Accept: application/json" \ -H "Authorization: Bearer …"
-
const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v2/pixverse/accounts/${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result});
-
import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v2/pixverse/accounts/{email}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())