Get current admin user and permissions
Returns the current admin user profile and a serialized list of permissions (CanCanCan rules). The SPA uses these to drive UI permission checks.
GET
/
api
/
v3
/
admin
/
me
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
const me = await client.me.get()
if (me.permissions.some((r) => r.allow && r.actions.includes('manage') && r.subjects.includes('Spree::Product'))) {
// show "Create product" button
}spree api get /me{
"user": {
"id": "admin_UkLWZg9DAJ",
"email": "evalyn_legros@schadenhermiston.info",
"first_name": "Charleen",
"last_name": "Kihn",
"full_name": "Charleen Kihn",
"selected_locale": null,
"created_at": "2026-07-27T20:00:44.530Z",
"updated_at": "2026-07-27T20:00:44.530Z",
"avatar_url": null,
"roles": [
{
"id": "role_UkLWZg9DAJ",
"name": "admin"
}
],
"stores": [
{
"id": "store_UkLWZg9DAJ",
"name": "Spree Test Store",
"code": "spree_1"
}
]
},
"permissions": [
{
"allow": true,
"actions": [
"manage"
],
"subjects": [
"all"
],
"has_conditions": false
},
{
"allow": false,
"actions": [
"cancel"
],
"subjects": [
"Spree::Order"
],
"has_conditions": false
},
{
"allow": true,
"actions": [
"cancel"
],
"subjects": [
"Spree::Order"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"destroy"
],
"subjects": [
"Spree::Order"
],
"has_conditions": false
},
{
"allow": true,
"actions": [
"destroy"
],
"subjects": [
"Spree::Order"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"edit",
"update"
],
"subjects": [
"Spree::RefundReason"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"edit",
"update"
],
"subjects": [
"Spree::ReimbursementType"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"update",
"destroy"
],
"subjects": [
"Spree::Role"
],
"has_conditions": true
}
]
}{
"error": {
"code": "authentication_required",
"message": "Authentication required"
}
}Authorizations
Secret API key for admin access
JWT token for admin user authentication
Headers
Bearer token for admin authentication
Was this page helpful?
⌘I
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
const me = await client.me.get()
if (me.permissions.some((r) => r.allow && r.actions.includes('manage') && r.subjects.includes('Spree::Product'))) {
// show "Create product" button
}spree api get /me{
"user": {
"id": "admin_UkLWZg9DAJ",
"email": "evalyn_legros@schadenhermiston.info",
"first_name": "Charleen",
"last_name": "Kihn",
"full_name": "Charleen Kihn",
"selected_locale": null,
"created_at": "2026-07-27T20:00:44.530Z",
"updated_at": "2026-07-27T20:00:44.530Z",
"avatar_url": null,
"roles": [
{
"id": "role_UkLWZg9DAJ",
"name": "admin"
}
],
"stores": [
{
"id": "store_UkLWZg9DAJ",
"name": "Spree Test Store",
"code": "spree_1"
}
]
},
"permissions": [
{
"allow": true,
"actions": [
"manage"
],
"subjects": [
"all"
],
"has_conditions": false
},
{
"allow": false,
"actions": [
"cancel"
],
"subjects": [
"Spree::Order"
],
"has_conditions": false
},
{
"allow": true,
"actions": [
"cancel"
],
"subjects": [
"Spree::Order"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"destroy"
],
"subjects": [
"Spree::Order"
],
"has_conditions": false
},
{
"allow": true,
"actions": [
"destroy"
],
"subjects": [
"Spree::Order"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"edit",
"update"
],
"subjects": [
"Spree::RefundReason"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"edit",
"update"
],
"subjects": [
"Spree::ReimbursementType"
],
"has_conditions": true
},
{
"allow": false,
"actions": [
"update",
"destroy"
],
"subjects": [
"Spree::Role"
],
"has_conditions": true
}
]
}{
"error": {
"code": "authentication_required",
"message": "Authentication required"
}
}
