---
sidebar:
  label: roboto.auth.scope
  order: 3
title: roboto.auth.scope
---
## Module Contents

### ApiScope

```python
class roboto.auth.scope.ApiScope
```

`from roboto.auth.scope import ApiScope`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/auth/scope.py#L12-L44)

Bases: `roboto.compat.StrEnum`

API scope of an access token: a group of requests the token can make.

A token with some scopes can make only the requests they cover. A token created with no scopes, or with every scope, is not limited by scope. Set a token's scopes with [`create()`](/docs/reference/python-sdk/roboto/domain/tokens/token#roboto.domain.tokens.token.Token.create) or [`create_token()`](/docs/reference/python-sdk/roboto/domain/devices/device#roboto.domain.devices.device.Device.create_token). `FilesImport` and `FilesUpload` cover the same requests: either one lets a token both upload and import files.

**Attributes**

- **ApiScope.ApiEverythingElse** = `'api.everything_else'`: Every request no other scope covers, including requests that manage tokens.

  A developer's token usually holds it. A device token that only uploads data can leave it out, which limits what someone holding a leaked secret can do.

- **ApiScope.DatasetsCreate** = `'datasets.create'`: Creating datasets.

- **ApiScope.FilesImport** = `'files.import'`: Importing files from an external object store into a dataset.

- **ApiScope.FilesUpload** = `'files.upload'`: Uploading files to a dataset.

#### ApiScope.all()

```python
@classmethod
def all() -> set[ApiScope]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/auth/scope.py#L37-L39)

Return every scope.

**Returns**

- `set[ApiScope]`

#### ApiScope.minimal_uploader()

```python
@classmethod
def minimal_uploader() -> set[ApiScope]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/auth/scope.py#L42-L44)

Return the scopes that let a token create datasets and add files to them, and nothing else.

**Returns**

- `set[ApiScope]`
