You need to sign in to do that
Don't have an account?

Session expired/invalid or INVALID_SESSION_ID error when trying to get access token through oAuth2 token?
Hi All,
When trying to get access token through https://test.salesforce.com/services/oauth2/token from an app hosted on heroku unable to get access token.
Error seen in logs:
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
Params for Post Request:
params={
'grant_type':'password',
'client_id':'3MVkfjayehklJSGHKHOL7j.O',
'client_secret':'649E63F81AED235CAD',
'username':'<UserId>',
'password':'<Password>'
}
When I hit through postman with same params I am able to get access token.
Approaches tried:
1. We have whitelisted all IP's
2. We have generated new client id and secret.
3. Hit the Same Url through the same parameters received the token.
4. Set Permitted Users to All users may self-authorize .
5.Relaxed IP restrictions.
Please help me in resolving this issue.
P.S: All the help available in Forum are related to login.salesforce.com and doesn't help in my case.
TIA.
Hi Simmy,
Thanks for the response.
Yes, I have tried usign the domain it doesn't help either.
Getting the sam error.
{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}
//VS
No Paul,
It is when I try to authenticate from heroku app.