web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get Access Toke...
Power Automate
Suggested Answer

How to get Access Tokens (Client Credentials) and refresh tokens before calling Third Party API

(1) ShareShare
ReportReport
Posted on by
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.
Categories:
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    1,135 Super User 2025 Season 2 on at
    Hi,
     
    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

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard