# API Signer: Troubleshooting

Below are a few issues you might encounter while working with API Signer, along with their workarounds.

### Error: User is not authorized – failed to fetch refresh token

Are you seeing output like this?

```bash
Post "https://api.fordefi.com/api/v1/logs": oauth2: cannot fetch token: 401 Unauthorized
Response: {"title":"User is not authorized","detail":"failed to authorize api signer","request_id":"fe17407d-2372-9baf-85e6-447dfeb1b919"}
```

This error usually indicates a stale or misconfigured API Signer setup.

To resolve the issue, remove the existing Signer — including its Docker volume and configuration — and perform a fresh setup:

1. Check which Docker volume the Signer is using (the default is `vol`):

```bash
docker volume ls
```
2. Remove the volume:

```bash
docker volume rm <volume_name>
```
3. Delete the old Docker config file:

```bash
rm ~/.docker/config.json
```
Skip this step if you're running multiple API Signers for different Fordefi workspaces on the same host. This file is global, so deleting it would also affect your other healthy API Signers.
4. Remove the API Signer from the Fordefi web console:
Navigate to **Settings > API Signer** in the Fordefi web console and delete the existing Signer.

5. Set up a new API Signer by following the instructions here:
[Set up an API Signer](https://docs.fordefi.com/developers/getting-started/set-up-an-api-signer)


### How do I update my API Signer?

To upgrade your Signer to the latest version:

1. Stop the currently running API Signer container.
2. Log in to Fordefi’s Artifactory and pull the latest image:

```bash
docker login -u fordefi fordefi.jfrog.io
```
Retrieve your password by navigating to **Settings > API Signer**, then clicking **View Docker Credentials**.

```bash
docker pull fordefi.jfrog.io/fordefi/api-signer:latest
```
3. Restart the API Signer container.


### How do I check the version of my API Signer and update it?

1. Call this endpoint to retrieve the latest versioned image:

```bash
curl -s -u username:password "https://fordefi.jfrog.io/artifactory/api/docker/fordefi/v2/api-signer/tags/list" | jq -r '.tags[]' | grep "^v" | sort -V | tail -1
```
2. Pull and install that specific version:

```bash
docker pull --platform linux/amd64 fordefi.jfrog.io/fordefi/api-signer:v0.105.39
```
3. Run the command from step 1 periodically to check whether a newer version is available.