• Anton Weihard
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Im using `JSForce` library to access to Salesforce. Im trying to build offline application to access to Salesforce so I just save user `access_token` and `refresh_token` internally. In JSForce library I try to use such auth configuration -> https://jsforce.github.io/document/#access-token-with-refresh-token and pass `access_token` and `refresh_token` but for some users I got `[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]` message but for some of them everything is working pretty well. So how it is possible that `refresh_token` is expired? I have users which probably use my integration during the several months without any problem but for some of them I got such a strange behaviour when `refresh_token` just expired. Could someone help me please?
Im trying to build Connected application which needs to have access to Apex API. When I install Connected application I got `accessToken` so in general I can access to many Salesforce API's but I also need to aacess to Apex SOAP API. I try to use this `accessToken` but Apex Soap API gave me `access` denied error. Could someone help me with that?
I want to use Apex API, but I can't find the URL which I can use. Could you please help me with that? or point me to related documentation?
Im using `JSForce` library to access to Salesforce. Im trying to build offline application to access to Salesforce so I just save user `access_token` and `refresh_token` internally. In JSForce library I try to use such auth configuration -> https://jsforce.github.io/document/#access-token-with-refresh-token and pass `access_token` and `refresh_token` but for some users I got `[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]` message but for some of them everything is working pretty well. So how it is possible that `refresh_token` is expired? I have users which probably use my integration during the several months without any problem but for some of them I got such a strange behaviour when `refresh_token` just expired. Could someone help me please?

When trying to refresh my user token via the API i receve the below error, i am trying to test out an integration  work arround for when the integration password is reset / security token expires.

{
    "error": "invalid_grant",
    "error_description": "expired access/refresh token"
}


I have tried to make the request via Curl and using Postman but receve the same error, as far as i can tell i have all of the appropiate rights set up on my connected app.

connected app
Example Curl request:

curl POST https://eu16.salesforce.com/services/oauth2/token -d "grant_type=refresh_token&client_id=3MVG9f..............................svQ10&client_secret=97E8475611A9...............................096391&refresh_token=lZI..........ZSQ"

I have redacted the sensitive infomation above, but this is the data i am entering:

client_id = This is the Consumer Key taken from the connected app screen

client_secret = This is the Consumer Secret  taken from the connected app screen

refresh_token = This is the user security token (Obtained from settings -> My Personal Infomation -> Reset Security Token) 

Is anyone able to detail what i am doing incorrectly?

Hi, I have registered in the developer.salesforce.com and want to connect rest api and get articles. I have done all steps using consumer key and consumer secret how is written in the documentation. After successfully authentication (OAuth) I have got access_token. Now I cannot get articles and I am getting this error [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]. This is my URL and Header parts.

https://eu12.salesforce.com/services/data/v38.0/support/knowledgeArticles?sort=ViewScore&channel=Pkb&pageSize=3
Content-Type: application/json; charset=UTF-8
Accept: application/json
Accept-Language: en-US
Authentication: OAuth 00D1r000000esNU!ARcAQNWSLQPIf_DOxKY4yNlkQ_doXITSfcfkj1vCAkSCIFdWMgIx.cDrBqSUFdsA3YmlBw4FKtJsyygyMncUlcKjSQQ.HPc4
User-added image