Hi I’m following the steps in the documentation outlined here:
https://docs.frappe.io/framework/user/en/api/rest
Using POSTMAN, I’m trying to call the function get_logged_user(). I’ve checked if it’s already been whitelisted and it seems to be the case but I’m still getting permission error and that the function is not whitelisted when using GET request.
"exception": "frappe.exceptions.PermissionError: <details><summary>You are not permitted to access this resource. Login to access</summary>Function <strong>frappe.auth.get_logged_user</strong> is not whitelisted.",
frappe/auth.py
@frappe.whitelist()
def get_logged_user():
return frappe.session.user
GET Request :
http://<base-url>/api/method/frappe.auth.get_logged_user
headers: {
'Authorization': 'token api_key:api_secret'
}
Can someone help me how I can call the function “get_logged_user()”? Just for figuring out how to call any erpnext functions. Thanks.