XF 2.1 Issue with API for updating user

I'm trying to perform a POST request using XF API to update user related fields but it appears to return a 403 error code.

API Usage: users/{id}/
Sending 'POST' request : /forum/api/users/1934/
Post parameters : visible=true
Response Code : 403
Oddly enough, when using the API to perform reactions, it works fine?

API Usage: posts/{id}/react
Sending 'POST' request to URL : /forum/api/posts/28/react/
Post parameters : reaction_id=1
Response Code : 200
Properties:
Java:
setRequestMethod("POST");
setRequestProperty("User-Agent", "Mozilla/5.0 ");
setRequestProperty("XF-Api-Key",  XF_API_KEY);
setRequestProperty("XF-Api-User", XF_USER_ID);


Am I doing something wrong? For the info; I am using a super key for the API.
 
You're sending the request as a specific user. Normally most users have permission to react to content, so that's likely why you're seeing a 200, but most users won't be able to edit anyone but themselves, so that's likely why you're seeing a 403.
 
You're sending the request as a specific user. Normally most users have permission to react to content, so that's likely why you're seeing a 200, but most users won't be able to edit anyone but themselves, so that's likely why you're seeing a 403.
Thank you for clarifying that! It all works now 🏆
 
Top Bottom