on ‎2023 Oct 17 9:44 PM
For Logging out a user I am using accounts.logout API (SAP CDC Logout API) and passing the UID of the user in the params. Before logging out I need to validate the user session if it is valid or not. Are there any ways to validate the session before logging out?
I tried using the accounts.session.verify API SAP CDC session verify API by passing the sessionInfo.cookieValue (obtained from user login response) into the oauth_token param of the verify API. But the api returns the following even when I am sending the necessary headers like apiKey, userKey, secret and grant_type
{ "callId": "97aa1107fed247b3aa22c9a07218befd", "errorCode": 403007, "errorDetails": "Invalid namespace 'accounts.session' or method 'verify' or you do not have the required permissions to call it. ", "errorMessage": "Permission denied", "apiVersion": 2, "statusCode": 403, "statusReason": "Forbidden", "time": "2023-10-17T19:15:49.763Z" }
Is there any way I can fix this or any other correct way of validating the session of the logged in User?
Thanks.
Request clarification before answering.
Hey,
just to clarify, we are talking about a backend scenario, right? Because if so, all API endpoints, I know of, require an access token of the user to verify the user's session.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.