Your agent can build the integration.See the two prompts
Documentation navigation

Profile

Normalized identity; null fields are legitimate. Use subject, not email, as account key.

On this page
GEThttps://api.anyoauth.com/v1/profile

Authentication: AnyOAuth profile bearer token.

Request

No request body. Pass the profile token in the Authorization: Bearer header.

SDK and HTTP examples

Custom SDK method: getProfile

Use this method when you own the routes or storage. Custom integration. This backend profile-token method is separate from browser getProfile(), which reads an application session.

get Profile
import { AnyOAuth } from "@anyoauth/node";

const client = new AnyOAuth({
clientId: process.env.ANYOAUTH_CLIENT_ID ?? "YOUR_CLIENT_ID",
clientSecret: process.env.ANYOAUTH_CLIENT_SECRET ?? "YOUR_CLIENT_SECRET",
baseUrl: process.env.ANYOAUTH_API_ORIGIN ?? "https://api.anyoauth.com",
});

const profile = await client.getProfile({
accessToken: process.env.ANYOAUTH_ACCESS_TOKEN ?? "aop_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
});

npm install @anyoauth/nodeConfidential backend SDKCurrent source example · published 0.1.0 predates these helpers

Underlying HTTP and compatibility-method examples
Profile
import { AnyOAuth } from "@anyoauth/node";

const client = new AnyOAuth({
clientId: process.env.ANYOAUTH_CLIENT_ID ?? "YOUR_CLIENT_ID",
clientSecret: process.env.ANYOAUTH_CLIENT_SECRET ?? "YOUR_CLIENT_SECRET",
baseUrl: process.env.ANYOAUTH_API_ORIGIN ?? "https://api.anyoauth.com",
});

const profile = await client.profile({
accessToken: process.env.ANYOAUTH_ACCESS_TOKEN ?? "aop_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
});

npm install @anyoauth/nodeConfidential backend SDKPublished 0.1.0 API

Input bindings in method references are illustrative. Callback routes load saved login attempts from the initiating browser's server session. Browser/mobile SDKs use their backend for confidential operations.

Response

Success status: 200.

FieldTypeRequiredDescription and constraints
subjectstringYes
provider"google" | "github" | "email"Yes
providerSubjectstringYes
namestring | nullYes
usernamestring | nullYes
emailstring | nullYes
emailVerifiedbooleanYes
avatarUrlstring | nullYes
Illustrative JSON response
{
"subject": "usr_example",
"provider": "google",
"providerSubject": "provider-subject",
"name": null,
"username": null,
"email": null,
"emailVerified": false,
"avatarUrl": null
}

Errors

Application errors use the shared error model. Infrastructure may return non-JSON responses; SDKs expose structured transport/protocol errors. Do not automatically retry a one-time code exchange.

FieldTypeRequiredDescription and constraints
errorstringYes
messagestringNo
Illustrative error response
{
"error": "request_failed",
"message": "The request could not be completed."
}

Contract source

This page, its field tables and sample inputs derive from OpenAPI version 0.2.0. Download OpenAPI · HTTP and SDK model schemas · SDK method contracts · Response schema