Forum Discussion
can you see if you still have this issue?
Hi,
Yes, the issue still exists for me. I already talked with support but did not get any solution to this issue and I was wondering if anyone else has issues using the “auto refresh” Salesforce token for a OAUTH2 account in SnapLogic. Support tells me I cannot auto refresh an account token without a token expiration date on the account so I’m stuck.
Hi Izapart,
I came to the same requirement where i need to get access_token and refresh_token from Salesforce using the OAuth 2. I am able to get access_token value and access_token_expiration shows as -1, which i am assuming that access_token never expires. But i am not able to get the refresh_token.
How you had configured the Salesforce account in order to get the refresh_token in your case.Any help is appreciated.
Thanks
Hi, actually in my SF instance the refresh token does expire but can be refershed using refresh token request. I use a REST POST snap each time I want to access
the SF API to refresh my token first just in case if it expires, using the grant type refresh_token.To receive a refresh token, follow these steps documented here:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_oauth_endpoints.htmBasically you need to first receive the authorization code. Then use it to request a refresh token using the “/token” url request.
In SnapLogic, before each of my API calls I refresh the token first using this in REST Post Snap service URL configured like here:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_refresh_token_oauth.htm using refresh_token grant type.It’s sad that we can’t create a SnapLogic Account for Salesforce API because the token does not have an expiration date (mandatory per SnapLogic). That would
have made this a lot easier and the tokens would refresh automoatically if selected to do so on the SL account. That is why I have to refresh the token manually in each of my pipelines as step 1 by using the REST POST snap and calling the /token url to refresh
it, then pass the token to my REST GET snap to be used in the header to get my data out of SF.- bhupender_singh7 years agoNew Contributor III
@lzapart could you please share your pipeline.slp for the workaround solution.Similar to what you had described, I have to go in account settings and click on authorize and apply for this to work.