List OAuth Identities
curl --request GET \
--url https://api.sublay.io/v8/:projectId/oauth/identities \
--header 'Authorization: <authorization>'import requests
url = "https://api.sublay.io/v8/:projectId/oauth/identities"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.sublay.io/v8/:projectId/oauth/identities', 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.sublay.io/v8/:projectId/oauth/identities",
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: <authorization>"
],
]);
$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.sublay.io/v8/:projectId/oauth/identities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.sublay.io/v8/:projectId/oauth/identities")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/oauth/identities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"identities": [
{
"id": "<string>",
"provider": "<string>",
"providerAccountId": "<string>",
"email": {},
"name": {},
"avatar": {},
"isVerified": true,
"createdAt": "<string>"
}
],
"hasPassword": true
}OAuth Endpoints
List OAuth Identities
List all OAuth identities linked to the current user
List OAuth Identities
curl --request GET \
--url https://api.sublay.io/v8/:projectId/oauth/identities \
--header 'Authorization: <authorization>'import requests
url = "https://api.sublay.io/v8/:projectId/oauth/identities"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.sublay.io/v8/:projectId/oauth/identities', 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.sublay.io/v8/:projectId/oauth/identities",
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: <authorization>"
],
]);
$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.sublay.io/v8/:projectId/oauth/identities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.sublay.io/v8/:projectId/oauth/identities")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/oauth/identities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"identities": [
{
"id": "<string>",
"provider": "<string>",
"providerAccountId": "<string>",
"email": {},
"name": {},
"avatar": {},
"isVerified": true,
"createdAt": "<string>"
}
],
"hasPassword": true
}Returns all OAuth identities linked to the authenticated user’s account, ordered by creation date. Use this to display connected accounts on a settings page.
Requires the user’s own access token; a service key is refused.
Headers
string
required
Bearer {accessToken} — a valid access token for the authenticated user.Response
OAuthIdentity[]
Array of linked identities, ordered oldest first.
Show properties
Show properties
string
Unique identity ID (UUID).
string
OAuth provider name (e.g.,
"google", "github", "external").string
The user’s account ID at the provider.
string | null
Email address returned by the provider.
string | null
Name returned by the provider.
string | null
Avatar URL returned by the provider.
boolean
Whether the provider marked the email as verified.
string
ISO timestamp of when the identity was linked.
boolean
Whether the user has a password set.
false for OAuth-only accounts. Use this
to decide whether to prompt the user to
set an initial password before letting
them unlink their last identity.Error Responses
User Token Required — 403
User Token Required — 403
A service key called this endpoint, with or without
actingUserId. It needs the signed-in user’s own access token.{
"error": "This endpoint needs the user's own access token; a service key can't use it.",
"code": "oauth/user-token-required"
}
Acting User Not Allowed — 400
Acting User Not Allowed — 400
A user token, or a request with no credentials, sent
actingUserId, even naming its own user. A user token always acts as its own user. (A service key gets the 403 above instead.){
"error": "actingUserId is only accepted with a service key. A user's own token always acts as that user.",
"code": "oauth/acting-user-not-allowed"
}

