You need to sign in to do that
Don't have an account?
Facing error as "This session is not valid for use with the REST API" while integration with PHP platform
Hello,
I want to create lead record using integration of php platform. I have written rest API for that. The code is working fine when tested on workbench. But now I have integrated salesforce with PHP platform. I do recieved the correct access code,client_id,client_secret,username,password, security token,Authorization:OAuth . I am sending the response in JSON format. But I am facing the issue like :
[0] => Array
(
[message] => This session is not valid for use with the REST API
[errorCode] => INVALID_SESSION_ID
)
Any help is appreciated. Thanks in advance!
Regards,
Ashwini
Hey Raj Vakati,
Thanks for your response!
Actually I had solved the error, I had missed two factor authentication setting in session setting.
All Answers
Go to the connected app and you can able to see the different OAuth scope
Access and manage your data (api)
Allows access to the logged-in user’s account using APIs, such as REST API and Bulk API. This value also includes chatter api, which allows access to Chatter REST API resources.
Hey Raj Vakati,
Thanks for your response!
Actually I had solved the error, I had missed two factor authentication setting in session setting.
Hi,
Even I am getting this error. Can someone please tell me where I can get this option? I am not able to find it.
Thanks!
Profile -> Session Settings -> "Session Security Level Required at Login-High Assurance". I believe when you try to use API logins the session required MFA related token also to access the Resource Server. When I removed the High Assurance then it working fine I believe this setup is intended for User-Agent or WebServer flow not for Server to Server connection using JWT Barear flow or UserName password flow.