# Creating an API user in WHMCS

In order to be able to exchange information between the Commitment Forecaster and WHMCS, access to the API must be created.

##### Adding a new API access

1\. Log in as an administrator to the WHMCS system.

```
System Settings -> Administrator Users
```

2\. Add a new user

[![2021-11-05_13-59.png](https://doc.puq.info/uploads/images/gallery/2021-11/scaled-1680-/0id2021-11-05-13-59.png)](https://doc.puq.info/uploads/images/gallery/2021-11/0id2021-11-05-13-59.png)

3\. Move to:

```
System Settings -> Manage API Credentials -> APIQ Roles
```

Create a new role and select only **BILLING -&gt; GETInvoices**

[![2021-11-05_14-03.png](https://doc.puq.info/uploads/images/gallery/2021-11/scaled-1680-/65E2021-11-05-14-03.png)](https://doc.puq.info/uploads/images/gallery/2021-11/65E2021-11-05-14-03.png)

4\. Move to:

```
System Settings -> Manage API Credentials -> API Credentials
```

5\. Create your API credentials [![2021-11-05_14-06.png](https://doc.puq.info/uploads/images/gallery/2021-11/scaled-1680-/Z8Q2021-11-05-14-06.png)](https://doc.puq.info/uploads/images/gallery/2021-11/Z8Q2021-11-05-14-06.png)

[![2021-11-05_14-07.png](https://doc.puq.info/uploads/images/gallery/2021-11/scaled-1680-/BZt2021-11-05-14-07.png)](https://doc.puq.info/uploads/images/gallery/2021-11/BZt2021-11-05-14-07.png)

Select the previously created user and API role

Press the **"Generate"** button

6\. Write the data they need to connect to apiWHMCS Identifier Secret

#####  

##### Access to WHMCS from IP number

Then you should allow access to the IP address of the server with the module installed in the WHMCS system

Move to:

```
System Settings -> General Settings -> Security
```

Add the IP address of the server with the module installed to the **API IP Access Restriction list**

[![2021-11-05_14-23.png](https://doc.puq.info/uploads/images/gallery/2021-11/scaled-1680-/yY62021-11-05-14-23.png)](https://doc.puq.info/uploads/images/gallery/2021-11/yY62021-11-05-14-23.png)