Payroll Integration
  • Introduction
  • Authentication
    • Testing the Client Id & Secret
    • Retrieving a Refresh and Access Token
    • Switching Users
  • Available APIs
    • Payroll API V1.0 Methods
    • Postman Import
  • Integrating Timesheet Applications
    • Login Management
    • Select an Employer
    • Mapping Hourly Rates and Employees
    • Storing the mapping for future use
    • Creating Hourly Payments in BrightPay
    • End 0f Financial Year Behaviour
  • Payroll Scenario Simulation
    • Payroll Simulation Request Headers
    • Payroll Simulation Scenarios
  • Configuring BrightPay for Testing
    • Setting up an Organisation and Employer
    • Setting up Employees
    • Setting up a Payment Schedule
    • Configuration Summary
  • Managing Errors
    • Error Responses
    • Error Code Definitions
  • Secure Design Requirements
Powered by GitBook
On this page
  • Prerequisites - This section assumes:
  • Using Swagger to test your Client Id and Secret
  1. Authentication

Testing the Client Id & Secret

PreviousAuthenticationNextRetrieving a Refresh and Access Token

Last updated 9 months ago

Prerequisites - This section assumes:

  • You have a Bright Client Id and Secret - please see the section for how to get these

  • You have a BrightID - please see the section for how to set up a BrightID

Using Swagger to test your Client Id and Secret

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

Navigate to

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.

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.

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.

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

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).

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.

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

Authentication
Authentication
https://external.brightpay.com/
BrightPay Swagger Interface
Swagger: Available authoriztions
Bright ID Sign in.
Swagger: Available authorizations
Swagger: Try it out
Swagger: Execute
Swagger: Execute results