> For the complete documentation index, see [llms.txt](https://docs.ixkio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ixkio.com/advanced-features/codelink/testing-codelink.md).

# 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;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ixkio.com/advanced-features/codelink/testing-codelink.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
