> For the complete documentation index, see [llms.txt](https://devdocs.brightpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devdocs.brightpay.com/authentication/testing-the-client-id-and-secret.md).

# Testing the Client Id & Secret

### Prerequisites - This section assumes:

* You have a Bright Client Id and Secret - please see the [<mark style="color:blue;">Authentication</mark>](/authentication.md) section for how to get these
* You have a BrightID - please see the [<mark style="color:blue;">Authentication</mark>](/authentication.md) section for how to set up a BrightID

### Using Swagger to test your Client Id and Secret&#x20;

Once you receive your Client Id and Secret you can test they work as expected using the BrightPay API swagger interface.&#x20;

Navigate to <https://external.brightpay.com/>

<figure><img src="/files/rE27QjT6ZuKvyzfZ5qGq" alt=""><figcaption><p>BrightPay Swagger Interface</p></figcaption></figure>

After opening the Swagger interface (shown above) there will be a green "Authorise" button (on the right) with an open padlock. Click on the "Authorise" button and the screen below will appear.

<figure><img src="/files/FnTffK12lTqZA9a6GMgx" alt=""><figcaption><p>Swagger: Available authoriztions</p></figcaption></figure>

On the screen above enter your Client Id, Secret and select the Scope. Then click the "Authorize" button. You may see the screen below which challenges for your details, or if you have entered your details recently into the Bright Identity Provider you may be automatically logged in.&#x20;

<figure><img src="/files/sQy1SOBn3wclfT3Kchv8" alt=""><figcaption><p>Bright ID Sign in.</p></figcaption></figure>

If the screen above does appear then enter your Bright ID details and click the "Sign in" button (alternatively you may be automatically logged in and you may not be presented with the above page). On completion of the process you should be returned to a screen like below.

<figure><img src="/files/559DKt0VJO7B80okvSHv" alt=""><figcaption><p>Swagger: Available authorizations</p></figcaption></figure>

On the "Available authorizations" screen (shown above) click the "Close" button. You will be returned to the Swagger page as below.

<figure><img src="/files/NL2SgXhBITZQnUVexuA7" alt=""><figcaption><p>Swagger: Try it out</p></figcaption></figure>

The "Authorise" button should now have a closed green padlock (as shown above). Now expand the section "/api/v1/Payroll/GetCurrentUserSummary", then click the "Try it out" button (on the RHS).

<figure><img src="/files/ppAGrdrgRSCFynhdllIz" alt=""><figcaption><p>Swagger: Execute</p></figcaption></figure>

Now click the "Execute" button. On a successful response you should see results similar to above (which show the logged in Bright ID’s username and email). This proves your Client ID and Secret have been used to successfully create an Access Token and can communicate with the API.

As a further test you can try to retrieve a list of employers (see below). This requet may return an empty list of employers (unless you have configured BrightPay). This step proves your token has been able to request data successfully from the BrightPay API.

<figure><img src="/files/EzUXkykiJeBMAfzL6WWL" alt=""><figcaption><p>Swagger: Execute results</p></figcaption></figure>

If you reach this stage your Client ID and Secret are working as expected.


---

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

```
GET https://devdocs.brightpay.com/authentication/testing-the-client-id-and-secret.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
