List the Accounts the current user belongs to
/v1/auth/me/accountsCode samples
curl -X GET "https://api.canopy.dev/v1/auth/me/accounts"
const response = await fetch("https://api.canopy.dev/v1/auth/me/accounts", {
method: "GET",
headers: {
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.canopy.dev/v1/auth/me/accounts",
headers={
},
)
data = response.json()package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.canopy.dev/v1/auth/me/accounts", nil)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Accounts returned
{
"items": [
{
"account_id": "string",
"account_name": "string",
"account_slug": "string",
"applications": [
{
"id": "string",
"name": "string",
"slug": "string"
}
]
}
]
}application/json
items *AuthAccountDto[]
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)