User Info
Optional GET /oauth/userinfo after token exchange. Userinfo is not a substitute for POST /verify/validate.
On this page
When to call userinfo
- Paste script:
fetchUserinfodefaults totrueand may attachuserinfo/userinfoErroron the success result. - Web SDK verify result already includes a compact
userobject from the token path; userinfo remains available via REST/SDK if you need the Bearer endpoint explicitly.
REST
GET
/oauth/userinfoGET https://auth.keyra.ie/oauth/userinfo
Authorization: Bearer {access_token}responseIllustrative claims
{
"id": 123,
"phone": "+353…",
"fullName": null,
"email": null
}Server SDK
import { createKeyraServer } from "@keyra/typescript-sdk";
const keyra = createKeyraServer({ baseUrl: "https://auth.keyra.ie" });
const profile = await keyra.getOAuthUserInfo(accessToken);Paste script
KeyraOAuth.renderButton("#keyra-login", {
// …
fetchUserinfo: true, // default
onSuccess: function (result) {
// result.userinfo — when fetch succeeded
// result.userinfoError — when fetch failed (token still present)
},
});