# Testing CodeLink

During the configuration of the CodeLink system you may wish to check the different scenarios and how they present themselves. We recommend the following procedure :&#x20;

### Testing an Invalid Key

The CodeLink Keys are passed in the redirect from ixkio to your website using the query string parameter `ixr`, for example :&#x20;

```
https://yourdomain.com/authsuccess?ixr=e97f8xrvzbsw4by7
```

You can test for an invalid key scanning the tag so it lands on your auth page on your website. Now edit the URL so that you remove a character from the key, for example :&#x20;

```
https://yourdomain.com/authsuccess?ixr=e97f8xrvzbsw4by
```

This will then register as an Invalid Key and you can test the response.&#x20;

### Testing for no Key

Once you have implemented the CodeLink setup, try to access your landing page without any key in the URL. So remove the ixr= and just enter the URL.&#x20;

This will simulate someone trying to access your page directly.&#x20;

### Testing for a Re-used Key

Scan as you would normally to get the key pass response on your landing page. Now refresh the page directly in the browser.&#x20;

If you refresh the page very quickly - within seconds - it should allow the key to pass. This is an  important allowance as potential delays on the redirect between ixkio and your website caused by slow internet connections can create problems.&#x20;

If you refresh the page after a number of seconds, you should get an expired code response.&#x20;

If you wait a longer time (until the next day for example) and then refresh, you will see a no code found response.&#x20;
