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

# Auth

# 🔒 Authentication & Authorization

At Oxen.ai we take your data security and privacy seriously. Every action performed on an Oxen.ai repository needs to be authenticated and authorized. You must provide an API\_KEY to perform any actions on an Oxen.ai repository. You must also have the correct permissions to perform the action.

### Public vs Private Repositories

On Oxen.ai you can choose if you want your repositories to be public or private. Private repositories limit access to the public internet, and can have viewers, editors, or admin roles.

### Obtain Auth Token

Before you can write to a remote repository, you must have permissions to do so. Permissions are handled through an `auth_token` that is passed in with the request.

You can obtain an `API Key` by creating an account on [Oxen.ai](https://oxen.ai) and going to your profile.

<img className="rounded-xl" src="https://mintcdn.com/oxenai/iXdgSU_j00SuyDvU/images/auth_key.png?fit=max&auto=format&n=iXdgSU_j00SuyDvU&q=85&s=6b9ddfc034d744eb72be10cc66be300f" alt="Oxen.ai authentication key" width="788" height="370" data-path="images/auth_key.png" />

### Set Auth Token

To set your auth token, you can either set it through the command line interface or directly in python.

<CodeGroup>
  ```python Python theme={null}
  from oxen.auth import config_auth
  config_auth("YOUR_AUTH_TOKEN")
  ```

  ```bash CLI theme={null}
  oxen config --auth 'hub.oxen.ai' YOUR_AUTH_TOKEN
  ```
</CodeGroup>

This will write the auth token to a file in `~/.config/oxen/auth_config.toml` for future use. If you set up your own [oxen-server](/getting-started/oxen-server) you can generate custom auth tokens there.

## Setup User

In order for Oxen to know who is committing and where to sync to by default, you must call [config\_user](/python-api/user) and pass in the name and email you would like to use in your commit messages.

```python theme={null}
from oxen.user import config_user
config_user("YOUR NAME", "YOUR EMAIL")
```

This will save a file in `~/.config/oxen/user_config.toml` that contains your user configuration.
