Salesforce service now integration problem with refresh the OAuth 2.0 token

lior grinberg2
Tera Expert

Hi Experts,

I want to get all the accounts from our SalesForce to Servicenow.

For that I saw this video   on how to set up the OAuth 2.0 between the two.

Here is a Screen shot of the setting:

SalesForce side:

find_real_file.png

Service Now side:

find_real_file.png

find_real_file.pngfind_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

 

 

 

The rest api that I use to get the account is this:

https://xxxxxxx.lightning.force.com/services/data/v54.0/query/?q=SELECT+Id+,+Name+from+Account

find_real_file.png

find_real_file.png

 

To get the OAuth token for the first time I pressed on the UI Action "Get OAuth Token" and I was able to get the token and the payload of the account.

find_real_file.png

I created a Job that will fetch the accounts every week.

The problem is that the access token is expired and the only way that I found to get a new one is to go back to the rest api message and press again on the UI Action "Get OAuth Token".

Anyone can help? Is there a way to get the access token automatically? Maybe my setting is incorrect.

Any help will be highly appreciated.

Thanks,

Lior Grinberg

1 REPLY 1

leoferrero
Tera Contributor

Hi I have same issue did you find a way to fix?