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

# scope-required

> A client session needs a scope.

| Status | Title |
| - | - |
| `422` | A scope is required |

## Where you see it

**Your server**, on `POST /client-sessions`.

## What it means

The body has no `scope`, or a scope that names nothing.

A client session may only reach what its scope names, and there is no scope for "everything". Name at least one of:

* `chargers`
* `sites`
* `location`
* `new_site: true`

## What to do

Build the scope from the action your app opens, which the SDK passes to your `fetchClientSecret` callback:

| Action | Scope |
| - | - |
| `add` with a site | `{ "sites": ["<siteId>"] }` |
| `add` at your user's address | `{ "location": { … } }` |
| `add`, asking the address | `{ "new_site": true }` |
| `network`, `setup`, `reconnect` | `{ "chargers": ["<chargerId>"] }` |

See [Client sessions and scopes](/sdk/concepts/client-sessions).

## Example

```json theme={null}
{
  "type": "https://developer.plugchoice.com/sdk/errors/scope-required",
  "title": "A scope is required",
  "status": 422,
  "code": "scope-required",
  "detail": "Name the chargers, the sites, the address or a new site (`scope`) this client session may reach."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.