Oauth Userinfo
curl --request GET \
--url https://api.member.dev/oauth/userinfo \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.member.dev/oauth/userinfo"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.member.dev/oauth/userinfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.member.dev/oauth/userinfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.member.dev/oauth/userinfo"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.member.dev/oauth/userinfo")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/oauth/userinfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"hub_id": "<string>",
"sub": "<string>",
"email": "<string>",
"email_verified": true,
"name": "<string>",
"picture": "<string>"
}oauth
Oauth Userinfo
OIDC UserInfo Endpoint (RFC 6749 §3.1 / OIDC §5.3).
Accepts a Bearer access_token with aud=“mio-oauth”. Returns identity claims gated by the granted scope:
- always: sub, hub_id
- “email” scope: email, email_verified
- “profile” scope: name, picture (when available)
SECURITY:
- Only accepts aud=mio-oauth tokens (contact, mio-api, and refresh tokens all have wrong audiences and are rejected with 401).
- Revoked (blacklisted jti) tokens return 401.
- Errors follow RFC 6750 §3.1: 401 + WWW-Authenticate: Bearer header.
This is an OIDC standard endpoint — NOT JSON:API.
GET
/
oauth
/
userinfo
Oauth Userinfo
curl --request GET \
--url https://api.member.dev/oauth/userinfo \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.member.dev/oauth/userinfo"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.member.dev/oauth/userinfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.member.dev/oauth/userinfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.member.dev/oauth/userinfo"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.member.dev/oauth/userinfo")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/oauth/userinfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"hub_id": "<string>",
"sub": "<string>",
"email": "<string>",
"email_verified": true,
"name": "<string>",
"picture": "<string>"
}Authorizations
Send platform JWTs, contact JWTs, or team API keys as Authorization: Bearer <token>.
Response
200 - application/vnd.api+json
Successful Response
OIDC UserInfo response (§5.3).
sub and hub_id are always present. email/email_verified are included only when the "email" scope was granted. name/picture only when "profile" granted.