UserCheckResponse
Response from the credential verification endpoint (usercheck), reporting whether your account has balance to make API calls. Respectify has no subscriptions: accounts are billed per call against a dollar balance (see Billing). This call is free.
- TypeScript
- Python
- PHP
- JSON
import type { UserCheckResponse } from "@respectify/client";
from respectify.schemas import UserCheckResponse
// Returned as associative array
$result = [$success, $info];
Types are returned as JSON objects in API responses.
Fields
active
Whether the account can make API calls: true when the balance is above $0, false when it is $0 or less or the balance could not be read
- TypeScript
- Python
- PHP
- JSON
result.active: boolean
result.active: bool
$result['active']: bool
"active": true
status
Account status: "active" when the balance is above $0, "no_credit" when it is $0 or less; null if the balance could not be read
- TypeScript
- Python
- PHP
- JSON
result.status: string | null
result.status: Optional[str]
$result['status']: ?string
"status": "active"
expires
Not used: always null. Balances do not expire.
- TypeScript
- Python
- PHP
- JSON
result.expires: string | null
result.expires: Optional[str]
$result['expires']: ?string
"expires": null
plan_name
Your current balance as text, for display (e.g., "Credit Balance: $12.34"); null if the balance could not be read
- TypeScript
- Python
- PHP
- JSON
result.plan_name: string | null
result.plan_name: Optional[str]
$result['plan_name']: ?string
"plan_name": "Credit Balance: $12.34"
allowed_endpoints
Not used: always null. Every endpoint is available on every account while the balance covers the call's price.
- TypeScript
- Python
- PHP
- JSON
result.allowed_endpoints: string[] | null
result.allowed_endpoints: Optional[List[str]]
$result['allowed_endpoints']: ?array
"allowed_endpoints": null
error
Error message if the balance could not be read (e.g., "Unable to determine account status"); null otherwise
- TypeScript
- Python
- PHP
- JSON
result.error: string | null
result.error: Optional[str]
$result['error']: ?string
"error": null
Example Response
{
"active": true,
"status": "active",
"expires": null,
"plan_name": "Credit Balance: $12.34",
"allowed_endpoints": null,
"error": null
}