> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Start token activation

`POST /api/web/v1/tokens/{tokenid}/activation`

Start activation of the given token. Caller requires the TOKENS:ADD permission.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| tokenid | path | Yes | string | The UUID of the token to be activated. |

## Request Body

### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "deliverActivationEmail": {
      "type": "boolean",
      "description": "A flag indicating if Identity as a Service should send an activation email including the activation information to the end user. If not specified, this attribute defaults to false."
    },
    "returnQRCode": {
      "type": "boolean",
      "description": "A flag indicating if the QR code for offline activation is returned.  The link encoded in the QR code is always returned for clients that want to encode their own QR code.  If not specified, this attribute defaults to false."
    },
    "secret": {
      "type": "string",
      "description": "The Base32-encoded secret of the token. If provided, IDaaS will use this value as the token seed and activate the token. This value is only supported for Google Authenticator. Value must contain at least 10 bytes and must not exceed 64 bytes."
    },
    "type": {
      "type": "array",
      "description": "The list of activation types that will be performed.  Allowed values are: CLASSIC (return activation values that must be manually entered into the mobile application), ONLINE (return a link that when clicked will launch the mobile application) and OFFLINE (return a QR code that can be scanned by the mobile application).  If no values are specified in the list, then all activation types are performed.",
      "items": {
        "type": "string",
        "description": "The list of activation types that will be performed.  Allowed values are: CLASSIC (return activation values that must be manually entered into the mobile application), ONLINE (return a link that when clicked will launch the mobile application) and OFFLINE (return a QR code that can be scanned by the mobile application).  If no values are specified in the list, then all activation types are performed.",
        "enum": [
          "CLASSIC",
          "ONLINE",
          "OFFLINE"
        ]
      }
    }
  },
  "description": "Optional parameters specifying how the token is to be activated. If not specified, all activation types are used, the QR code is returned and the activation email is sent.",
  "title": "ActivateParms"
}
```

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "activationAddress": {
      "type": "string",
      "description": "The activation address for the token.  This value should be entered into the Mobile ST application if you want to perform manual activaiton."
    },
    "activationCode": {
      "type": "string",
      "description": "The activation code for the token.  This value should be entered into the Mobile ST application if you want to perform manual activation"
    },
    "activationOnlineHttpURL": {
      "type": "string",
      "description": "The HTTP activation URL.  Clicking on this URL on your mobile device will redirect you to the Mobile ST application to perform activation."
    },
    "activationOnlineURL": {
      "type": "string",
      "description": "The application specific activation URL.  Clicking on this URL on your mobile device will launch the Mobile ST application to perform activation."
    },
    "activationPassword": {
      "type": "string",
      "description": "If the Mobile ST prompts you to enter an activation password during activation, this attribute is the password you must enter."
    },
    "activationQRCode": {
      "type": "string",
      "description": "The base-64 encoded activation QR code.  This QR code can be scanned by the Mobile ST application to perform activation."
    },
    "activationURL": {
      "type": "string",
      "description": "The URL encoded in the activation QR code."
    },
    "serialNumber": {
      "type": "string",
      "description": "The serial number of the token."
    }
  },
  "description": "The result of a token activate operation.",
  "title": "ActivateResult"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "TOKENS:ADD"
    ]
  }
]
```
