---
title: "Check the current user’s permissions on resources"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check the current user’s permissions on resources

Path: CloudRaker Workspace API › Authorization

`POST /authorization/me/check`

Checks resource access for the authenticated caller only. Authorization: any authenticated organization member — the subject is always the caller’s organization membership, so a caller can never probe another subject. Body: `checks` is a 1–50-item array of `{ permission, resourceType, resourceExternalId }`. Returns `{ results }` (one entry per check, each with an `authorized` boolean, in request order). If the caller has no organization-membership claim, returns `{ results: [] }`.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `checks` (`checkMyAccess.checks`; array<object>, required)
  - `permission` (`checkMyAccess.checks.permission`; string, required)
    - minLength 1
  - `resourceType` (`checkMyAccess.checks.resourceType`; string, required)
    - minLength 1
  - `resourceExternalId` (`checkMyAccess.checks.resourceExternalId`; string, required)
    - minLength 1

## Example request

```json
{
  "checks": [
    {
      "permission": "string",
      "resourceType": "string",
      "resourceExternalId": "string"
    }
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/authorization/me/check \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "checks": [
    {
      "permission": "string",
      "resourceType": "string",
      "resourceExternalId": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/authorization/me/check';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    checks: [{permission: 'string', resourceType: 'string', resourceExternalId: 'string'}]
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/authorization/me/check"

payload = { "checks": [
        {
            "permission": "string",
            "resourceType": "string",
            "resourceExternalId": "string"
        }
    ] }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Per-check authorization results for the calling user.

#### Example

```json
{
  "results": [
    {
      "permission": "space:read",
      "resourceType": "space",
      "resourceExternalId": "string",
      "authorized": true
    }
  ]
}
```

- `results` (`checkMyAccess.response.200.results`; array<object>, required) — One entry per requested check, in request order.
  - `permission` (`checkMyAccess.response.200.results.permission`; string, required)
    - example `"space:read"`
  - `resourceType` (`checkMyAccess.response.200.results.resourceType`; string, required)
    - example `"space"`
  - `resourceExternalId` (`checkMyAccess.response.200.results.resourceExternalId`; string, required)
  - `authorized` (`checkMyAccess.response.200.results.authorized`; boolean, required)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`checkMyAccess.response.400.success`; boolean, required)
  - one of `false`
- `error` (`checkMyAccess.response.400.error`; array<unknown>, required)
- `data` (`checkMyAccess.response.400.data`; unknown, required)


Source: https://docs.cloudraker.com/workspace/api/authorization/check-my-access/index.md
