I am making an automated recurring flow to trigger Paylocity Get Employee Punch Details API for all employees. For this flow to work and run 3 times a day without any errors, I should have the access token which refreshes. Please tell me the steps to get the access token and refresh tokens so that the flow will run without errors.
Here's a breakdown of how you can handle the Paylocity API token refresh for your recurring Power Automate flow: ·Register Application: Obtain Client ID and Client Secret from Paylocity. ·Obtain Access Token:
Make a request to the Paylocity OAuth token endpoint with your Client ID and Client Secret.
Include the necessary parameters to receive an access token.
·Store Access Token: Securely store the access token. ·Set Up Token Refresh:
Include an action in the flow to call the token API with credentials to obtain a new access token.
Capture the response to extract the new access token.
Place this action above the main API call to ensure the main API call always uses a refreshed token because access tokens typically have a limited lifespan.
·Make API Calls:
Use the valid access token retrieved from the token API in the main API call.
Hope this helps.
Thanks!
Inogic
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.