cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bjorn
Advocate III
Advocate III

Custom Connector Token Refresh?

I've created a cusom connector to Salesforce (the 'Premium' Flow connector doesn't support a couple API features I need). It works fine, but stops working after 4 hours, which is the session timeout setting for our Salesforce org. I need my connector to get a refresh token but I'm not sure how to do it. Has anyone gotten a Flow custom connector access token refresh from Salesforce working?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @manuelstgomes,

 

I'll post this in case it helps anyone else. I finally gave up with my custom connector and just make direct HTTP requests. I post my client_id, client_secret, username, and password (for Salesforce, that's password+token) to their token endpoint. The return contains an access_token that I store in a variable and use in the header of my subsequent API requests. This avoids the token refresh issue I was having and is more flexible (I can make any number of different API calls via HTTP, whereas if I used a custom connector I would have had to define them each as unique actions).

 

 

SalesforceHTTP.png

View solution in original post

4 REPLIES 4
manuelstgomes
Super User II
Super User II

Hi @Bjorn 


I just stumbled on your request. You've been waiting a while for a reply.

Were you able to solve it? Can you post the solution so that we can all learn from it?

If you still need help, please let me know what changed.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Hi @manuelstgomes,

 

I'll post this in case it helps anyone else. I finally gave up with my custom connector and just make direct HTTP requests. I post my client_id, client_secret, username, and password (for Salesforce, that's password+token) to their token endpoint. The return contains an access_token that I store in a variable and use in the header of my subsequent API requests. This avoids the token refresh issue I was having and is more flexible (I can make any number of different API calls via HTTP, whereas if I used a custom connector I would have had to define them each as unique actions).

 

 

SalesforceHTTP.png

View solution in original post

Hi @Bjorn 

 

Thanks for posting the solution. Well done!

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

JacksonOng
Regular Visitor

HI, I am trying to do the same thing, but using the http post is just too much work for multiple API calls. Did anyone find a better solution? 

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (58,147)