# GenerateLicense()

| Arguments | Type    | Required | Default |
| --------- | ------- | -------- | ------- |
| Amount    | Integer | True     |         |
| Days      | Integer | True     |         |
| Level     | Integer | True     |         |
| Format    | Integer | True     |         |
| Prefix    | String  | False    |         |
| Length    | Integer | False    |         |

![Available License Formats](https://4052962252-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPk_dyrVJ62R6teTm4z%2F-MPl3n-kuYJyFHfqu_7T%2F-MPl4b8J0TsbHSKWRNVX%2Fimage.png?alt=media\&token=048d7a52-0bbd-45d9-a01e-487decba8bc0)

{% hint style="warning" %}
Make sure to pass a prefix if needed.
{% endhint %}

```python
import PyAuthGG

Admin = PyAuthGG.Administration("ADMIN API KEY")

Admin.GenerateLicense(2, 31, 1, 4, "XFUEY", 10)
```

### Success Response

```javascript
{
   "0":"XFUEY-D7A7A2HURO",
   "1":"XFUEY-IDBYZHLKPM"
}
```

### Error Response

The following error is returned when a prefix format does not get a prefix passed.

```javascript
{
   "status":"failed",
   "info":"No prefix"
}
```
