# Generate token (deprecated)

**Updated 20 January 2025**

**In the latest version of the plugin, the token is generated by the plugin by passing the username and password, so this section is deprecated.**

With veeam backup replication open with the chosen user, navigate to the following url:

```
https://<hostname>:<port>/swagger/ui/index.html
```

\* Default port: 9419

On the Veeam Backup &amp; Replication REST API 1.0 page, expand the Login section and click POST api/oauth2/token.

[![image-1643730819768.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/image-1643730819768.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/image-1643730819768.png)

In the expanded method window, click Test.

In the grant\_type drop-down list, select password.

In the username and password fields, specify the credentials of a user created in Veeam Backup &amp; Replication.

[![image-1643730868633.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/image-1643730868633.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/image-1643730868633.png)

Click on Execute.

Wait for the response from the server. A successfully completed operation returns the response code 200. In the body of the response, Veeam Backup &amp; Replication returns an access token, its expiration time and an update token.

\* Remember that the duration of the access token is only 15 minutes.