A user, Maduka_Dilshan, is attempting to use the Discourse REST API to allow users to like posts. Despite having a Global API key with a global scope, they are receiving a “You are not permitted to view the requested resource” error when trying to like a post.
Maduka_Dilshan has already successfully implemented other API features such as topic creation, post creation, and bookmarking using the same API key and category settings.
Bas suggests that Maduka_Dilshan may need to use a User API key, but Maduka_Dilshan is unsure why this would be necessary for liking posts when other features work with the Global API key.
After some investigation, Maduka_Dilshan discovers that the issue may be due to the contentId being set to the correct post ID. However, it is later revealed that Maduka_Dilshan was trying to like their own post, which is not possible.
Maduka_Dilshan apologizes for the mistake and thanks the community for their help.
Hi all. I am pretty new to Discourse and checked All Site Settings (/admin/site_settings) section to find a matching option to allow any level of user to like posts using RESTapi
At the moment, all users can ( without public ) create topics, add replies etc. However a normal user (tl0, tl1 etc) cannot like to any post through the API ( But can like using the web panel )
You are not permitted to view the requested resource.
However if i log into the discourse as the user then that user can make a like,
So far I have integrated, Topic create, Post Create & Bookmark APIs with same API key with same categories and username and they work without any permission issue.
Could you please help me to figure out what im doing wrong here ? Let me know if more information is needed.
but why only for like ? I already implemented post creation, reply creation, bookmark add, remove with the Discourse API using Global key ( user level: all-users, scope: global )
Also tried to create a new Global API key, still getting the same error
If the API key has global scope and valid for all users, then following API should work. isn’t it