Rest API give general ledger api permission to Guest


I want to give general ledger permission to guest user using api.
i tried /api/method/ but it says not permitted,

then i duplicate general ledger and added @frappe.whitelist(allow_guest=True) before execute function but it still says not permitted.

can you show full path and work you have done ? then only someone can help

Path :

/api/method/{"company": "Test", "report_type": "All",
	"from_date": "2020-07-20",
	"to_date": "2020-08-20",
	"group_by": "Group by Voucher Consolidated",
	"include_default_book_entries": 1}

Change in Code:

Try use ‘frappe.set_user(“Administrator”)’ or any user has proper privilege.


Still says not permitted.

Should put it into the def

Still same issue.

Can you share the code again please

def execute(filters=None, api=0):
	if not filters:
		return [], []
	if api:
		filters = json.loads(filters)
1 Like

Have you restart bench ?

Yes i did,
also tried other users that have required permissions but still same.

@youssef thanks for your time and help. it starts working after clearing caches of my browser. :+1:

1 Like