• Venu Sam
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

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 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.