# Licensed Features

## Features

### Insiders Features

open-wa is at the forefront of open source WA development. Some cutting edge features are available exclusively to license holders. Although there are multiple types of licenses, the most affordable is the Insiders license with the most amount of unlockable features. To identify which features are unlcoked with an Insiders license, look out for the "Insiders" tag in [the Client documentation](/docs/api/classes/api_Client.Client).

<img src='/img/license-identifier.png' />


### Sending messages to non-contact numbers

The ability to send messages to non-contact numbers is restricted in this library to prevent spam.

There are 3 ways to start a chat with a new number:

1. [WA Links](https://faq.whatsapp.com/en/26000030/)
  
      You can send a special link to the person you want to start a chat with. This will open a conversation with your number on their phone. This way you can insure that they have explicitly started a conversation with you.
2. [WA Buttons](https://github.com/smashah/whatsapp-button?ref=open-wa-nodejs)

      You can add this button to your website which, when clicked, will open a chat with you in the same way as above.
3. [With a Restricted License Key](#how-to-get-a-license-key)

     In order to unlock the functionality to send texts to unknown numbers through @open-wa/wa-automate itself, you will need a [Restricted License key](https://gum.co/open-wa?tier=1%20Restricted%20License%20Key).

     One License Key is valid for one number. Each License Key for this is £10 per month. [Instructions below.](#how-to-get-a-license-key)

### Story Keys

:::caution

Unfortunately, due to MD updates story features are currently broken.

:::

After a lot of effort, ability to send text, image and video stories is available exclusively in this library. If you want access to the feature of posting Whatsapp Stories, please contact shah@openwa.dev

## How to get a License Key

1. Go to [Gumroad](https://gum.co/BTMt?tier=1%20Restricted%20License%20Key).
2. Click on the type of license you require.
3. In the checkout, ***enter the host account number you want to assign to the License Key (the one you will be using with open-wa, not your personal number)*** , along with the use case for this functionality and your github username. Please note, with this new system you'll only be able to change the number once.
4. Complete the checkout process.
5. You will instantly receive your License key on the screen and in your email.

   <div align="center">
   <img src="https://raw.githubusercontent.com/open-wa/wa-automate-nodejs/master/resources/membership.png"/>
   </div>

6. Use your license with the instructions below:
  
## How to use your license

This depends on how you're using the library. If you're using it with your own custom code then you can enter the licenseKey like so within the config of your `create` command:


<!-- prettier-ignore-start -->

import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

<Tabs groupId="usage-mode" defaultValue="cli" 
values={[ 
  { label: "EASY API", value: "cli" }, 
  { label: "Code", value: "code" }, 
  { label: "Docker", value: "docker" },
]}>

<!-- prettier-ignore-end -->

<TabItem value="cli">


```shell
> npx @open-wa/wa-automate --license-key FE764A87-BB9B48EE-BBBC035C-9736F87
```

</TabItem>


<TabItem value="code">


```javascript
create({
  licenseKey: "FE764A87-BB9B48EE-BBBC035C-9736F87"
})
```

</TabItem>


<TabItem value="docker">


```shell
> docker run openwa/wa-automate --license-key FE764A87-BB9B48EE-BBBC035C-9736F87
```

</TabItem>


</Tabs>

## Keys

| Name | link | Description
| --------------------------------- | ----------- |  ----------- |
| Insiders | [LINK](https://gum.co/BTMt?tier=Insiders%20Program) | [All Insiders Features](#insiders-features)#insiders-features
| Restricted | [LINK](https://gum.co/open-wa?tier=1%20Restricted%20License%20Key) | Send messages to non-contacts

All keys include access to all insider's features. You do not need a Premium Key to send messages to non-contacts.

## Troubleshooting

If the license key is showing up as invalid, there may be an issue with your host account number you entered in the checkout form. In some countries, the host account number is different from the actual number (for example in Brazil, an extra 9 is added). If you're unsure about your host account number then use the following code:

```javascript
const hostAccountNumber = await client.getHostNumber();
console.log('Host account', hostAccountNumber);
```

If it's different from what you've entered in the checkout form, [please fill and send this email.](mailto:shah@openwa.dev?subject=OPENWA%3A%20WRONG%20HOST%20ACC%20NUMBER&body=email%20used%20to%20buy%20key%3A%0D%0Alicense%20key%3A%0D%0Acorrect%20host%20account%20number%3A%0D%0A)

If you are having issues where your license key shows as valid in the console, but the features continually return `false` this may be due to a NodeJS issue relating to the time on your machine. To fix this, make sure your machine's time is correct.

## Switching your host account

If your development and production host accounts are different, then you can enter the development host account number in the form and when you're ready to your production host account, [fill and send this email.](mailto:shah@openwa.dev?subject=OPENWA%3A%PRODUCTION%20HOST%20ACC%20NUMBER&body=email%20used%20to%20buy%20key%3A%0D%0Alicense%20key%3A%0D%0Acorrect%20host%20account%20number%3A%0D%0A)

## Notes

- One license key is valid for one host account number.
- You can change the number assigned to a specific License Key once.
- In order to cancel your License Key, simply stop your membership.
- You can use multiple license keys for each host number.
- Apart from adding your licenseKey to your config, you will need to change nothing else in your code.
- An added benefit for members is priority on issues.
- License Key requests may be rejected.
- All code you will receive from the license server is closed-sourced and is under the same license as this project. You will not be able to read it. It is not transferrable to another number or another project.
- All keys provide access to Insiders Features.
- No Refunds unless you have chosen the incorrect license upon checkout. Refund requests need to take place after the correct license is purchased. [Once the correct license is purchased please email me for a refund.](mailto:shah@openwa.dev?subject=OPENWA%3A%LICENSE%3A%CORRECTION)
- [Volume licenses are available upon request.](mailto:shah@openwa.dev?subject=OPENWA%3A%VOLUME%%20LICENSE)
- [Referral links are available upon request.](mailto:shah@openwa.dev?subject=OPENWA%3A%Referral%%20Scheme)