OAuth
Sign in with AnythingAuth.
AnythingAuth lets another site sign members in with their anything.solutions account. Members register applications in the Applications tool and receive a client ID. Confidential applications also receive a client secret.
Creating a web app or regenerating its client secret requires your account password and, when enabled, a fresh authenticator or backup code. Public apps do not receive a secret and do not ask for this step-up.
The service implements OAuth 2.0 authorization code with a UserInfo endpoint. It does not implement OpenID Connect and does not issue ID tokens.
Applications can also request payments from members with AnythingPay. See Payments.
Endpoints
| Endpoint | Use |
|---|---|
https://anything.solutions/oauth/authorize | Authorization. GET. |
https://anything.solutions/oauth/token | Token. POST, form-encoded. |
https://anything.solutions/oauth/userinfo | UserInfo. GET with Authorization: Bearer <token>. |
https://anything.solutions/oauth/transactions | Paged transaction history. Requires the transactions scope. |
https://anything.solutions/oauth/ai/key | Issues an AnythingCloud AI key. Requires the ai scope. |
https://anything.solutions/oauth/revoke | Revokes an access or refresh token. |
https://anything.solutions/oauth/introspect | Reports whether a token is active and its scope. |
https://anything.solutions/.well-known/oauth-authorization-server | Server metadata. |
Authorization request
Send the member to the authorization endpoint with these parameters:
| Parameter | Value |
|---|---|
response_type | code |
client_id | The application's client ID. |
redirect_uri | One of the application's registered redirect URIs. |
scope | Space-separated scopes. Defaults to profile, which the application must have selected. |
state | An unguessable value, returned unchanged on the callback. |
code_challenge | BASE64URL(SHA256(code_verifier)). |
code_challenge_method | S256 |
prompt | consent shows the consent screen even when the member has already approved the scopes. Optional. |
https://anything.solutions/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&scope=profile%20email&state=RANDOM_STATE&code_challenge=CODE_CHALLENGE&code_challenge_method=S256
Token exchange
Exchange the returned code at the token endpoint with a form-encoded POST. Send client_id and client_secret in the body, or use HTTP Basic with the same pair. Public clients send client_id and omit the secret.
import requests
response = requests.post(
"https://anything.solutions/oauth/token",
data={
"grant_type": "authorization_code",
"code": "AUTHORIZATION_CODE",
"redirect_uri": "https://example.com/callback",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code_verifier": "CODE_VERIFIER",
},
)
tokens = response.json()
const response = await fetch(
"https://anything.solutions/oauth/token",
{
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
grant_type: "authorization_code",
code: "AUTHORIZATION_CODE",
redirect_uri: "https://example.com/callback",
client_id: "YOUR_CLIENT_ID",
client_secret: "YOUR_CLIENT_SECRET",
code_verifier: "CODE_VERIFIER",
}),
},
);
const tokens = await response.json();
To refresh a token, send the refresh token with grant_type=refresh_token:
import requests
response = requests.post(
"https://anything.solutions/oauth/token",
data={
"grant_type": "refresh_token",
"refresh_token": "REFRESH_TOKEN",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
},
)
tokens = response.json()
const response = await fetch(
"https://anything.solutions/oauth/token",
{
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
grant_type: "refresh_token",
refresh_token: "REFRESH_TOKEN",
client_id: "YOUR_CLIENT_ID",
client_secret: "YOUR_CLIENT_SECRET",
}),
},
);
const tokens = await response.json();
A successful exchange returns bearer credentials. Store them on your server, never in a page or a log:
{
"access_token": "ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "REFRESH_TOKEN",
"scope": "profile email"
}
UserInfo
Request the member's claims with the access token as a bearer credential:
import requests
member = requests.get(
"https://anything.solutions/oauth/userinfo",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
).json()
const response = await fetch(
"https://anything.solutions/oauth/userinfo",
{ headers: { Authorization: "Bearer ACCESS_TOKEN" } },
);
const member = await response.json();
Example response with the profile, email, balance, and roles scopes:
{
"sub": "482",
"username": "example",
"display_name": "Example Member",
"picture": "https://cdn.example.com/avatars/482.webp",
"profile_url": "https://anything.solutions/u/example.482",
"email": "[email protected]",
"email_verified": true,
"balance": {
"usd": 12.5,
"currency": "USD",
"amount": 12.5,
"display": "$12.50"
},
"roles": [
{"name": "Member", "color": "#3b6fd4"}
]
}
Theme and currency
Request the appearance and currency scopes together to match the member's theme and money format. The theme is always a concrete dark or light value, and the color fields are CSS-ready hex values for that theme. Members who have not saved a preference receive the site defaults.
Add both scopes to the authorization request:
https://anything.solutions/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&scope=appearance%20currency&state=RANDOM_STATE
UserInfo then returns the member's appearance and display currency:
{
"sub": "482",
"theme": "light",
"accent": "purple",
"accent_color": "#6b3fb0",
"accent_contrast": "#ffffff",
"background_color": "#f5f6f8",
"currency": {
"code": "EUR",
"name": "Euro",
"symbol": "€"
}
}
| Claim | Use |
|---|---|
theme | dark or light. |
accent | The member's accent choice, for example purple. |
accent_color | CSS hex color for buttons, links, and highlights. |
accent_contrast | CSS hex color for text and icons drawn on accent_color. |
background_color | CSS hex page background for the active theme. |
currency | Display currency code, name, and symbol. Amounts in UserInfo use this currency. |
The appearance scope grants the theme and color claims; the currency scope grants the currency object. Request only the scopes the application needs.
Transaction history
With the transactions scope, the full balance ledger is available in pages. UserInfo returns the newest 50 entries plus pagination metadata; use this endpoint for older pages and filters.
import requests
page = requests.get(
"https://anything.solutions/oauth/transactions",
params={"per_page": 25, "page": 2, "since": "2026-01-01"},
headers={"Authorization": "Bearer ACCESS_TOKEN"},
).json()
const url = new URL("https://anything.solutions/oauth/transactions");
url.searchParams.set("per_page", "25");
url.searchParams.set("page", "2");
url.searchParams.set("since", "2026-01-01");
const response = await fetch(url, {
headers: { Authorization: "Bearer ACCESS_TOKEN" },
});
const page = await response.json();
| Parameter | Use |
|---|---|
page | Page number, starting at 1. Default 1. |
per_page | 25 or 50. Default 50. |
since | ISO 8601 date or timestamp. Inclusive. |
until | ISO 8601 date or timestamp. Inclusive. A date means the end of that day in UTC. |
direction | credit or debit. |
reason | Exact ledger reason, for example payout_request. |
order | newest (default) or oldest. |
Each entry carries a readable type, direction, amount and balance, and timestamp. Amounts also include a formatted display value.
{
"transactions": [
{
"id": 9201,
"type": "Cash-out requested",
"reason": "payout_request",
"direction": "debit",
"amount": {"display": "$-5.00"},
"balance": {"display": "$12.50"},
"created_at": "2026-10-01T12:00:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 50,
"total": 120,
"pages": 3,
"has_prev": false,
"has_next": true
},
"filters": {
"since": null,
"until": null,
"direction": null,
"reason": null,
"order": "newest"
}
}
AnythingCloud AI
With the ai scope, an application can request an AnythingCloud AI key for the signed-in member. Requests made with that key use the member's balance, so the application never stores payment details or runs a billing flow.
Request the key once and keep it on your server. Calling the endpoint again replaces the previous key for the same application and member.
import requests
response = requests.post(
"https://anything.solutions/oauth/ai/key",
headers={"Authorization": "Bearer ACCESS_TOKEN"},
)
ai = response.json()
const response = await fetch(
"https://anything.solutions/oauth/ai/key",
{
method: "POST",
headers: { Authorization: "Bearer ACCESS_TOKEN" },
},
);
const ai = await response.json();
{
"key": "ac_ai_...",
"prefix": "ac_ai_...",
"name": "Example App",
"base_url": "https://anything.solutions/v1",
"models": ["Qwen3.6-35B-A3B", "deepseek-flash"]
}
Use base_url and key with any OpenAI-compatible client. See AI for models, pricing, and billing. The first key request enables AnythingCloud for the member if it is not already enabled. Requests still need a positive balance; when the account cannot spend, the AI endpoint returns 403 and the app should ask the member to add funds.
The member can see the key in Cloud → AI and remove it by revoking the application in Settings → Connected apps; revocation stops the key immediately.
App storage
With the storage scope, an application can keep private JSON data for each member, such as game saves, progress, or preferences. Each application has its own space per member.
See the App storage guide for the endpoints, examples, limits, and member controls.
Scopes
When you register an application, you choose the scopes it may request. An authorization request may ask for any subset of that set; requesting anything else is refused with invalid_scope. Changing the selection revokes existing tokens and asks members to approve the app again.
| Scope | Grants |
|---|---|
profile | sub, username, display name, profile picture, profile link |
email | Email address and verification status |
currency | Display currency code, name and symbol |
language | Language and locale preference |
timezone | Preferred time zone |
appearance | Dark or light theme, accent name, and matching hex colors |
region | Country and location, when set |
balance | USD balance and approximate value |
transactions | Paged transaction history, amounts and balances |
roles | Role badges shown on the profile |
stats | Reputation, post and thread counts, follower counts, join date |
storage | A private key/value store for this application and member |
ai | An AnythingCloud AI key billed to the member's balance |
Security
redirect_urimust exactly match one of the URIs registered for the application. Wildcards and partial matches are refused.- Send
statewith every authorization request and compare it on the callback. It prevents a forged callback from being accepted. - Public clients must use PKCE with S256.
- Keep client secrets on the server. Never ship one in a browser or mobile app.
- Refresh tokens rotate on every use. The old token stops working. Presenting it again revokes the whole token family.
- Access tokens are bearer credentials. Send them only over HTTPS and keep them out of logs.
- App storage is bound to the token's application and member. The API never accepts either identity in the request.
- An AI key is bound to the member who approved the application. Revoking that application revokes the key immediately.
- Members can review and revoke an application's access at any time in Settings → Connected apps.
- Application names are self-registered and are not verified. Only authorize applications you trust.