Forum Discussion
Thanks clemlith , glad to see I'm not the only one with this issue !
Unfortunately I'm still experiencing this suprising "Denied Access" error (even though other API write calls all proceed successfully). I checked all possible permissions and they seem to be set correctly, I am logged in as Admin but still can't get to add a Me Too to a Question programatically.
Do you have any idea what could be the reason, AdamA , by any chance ?
Thank you for any feedback you can give, I'm sure this can be solved :)
Sorry for the delayed response, I was on vacation and out of the office.
I realize now that the rating.value I advised initially was incorrect, instead of 1 it should be 0. I apologize for the confusion!
/messages/id/<message-id>/ratings/key/question_met
I had the value confused with what you would want to use for our helpfulness feature, where a value of 1 means "helpful" and a value of -1 means "Not helpful". In the case of Me Too, since there is no negative variant (as in: "Not me too") the system uses a value of 0.
- sakkaoui11 years agoMentor
Hi AdamA
Sorry to come back to you after such a long time.
We have tested this new value and the good news is : it works !
The issue, now, is that I manage to add a metoo to a message programmatically, using a certain user of our test plateform. But I can find out how to reproduce this with other users.I tried to apply the same level of permissions the working user has to the others, even giving all permissions, but it seams to have no impact on the API metoo rating ability.
This is what I get using both users (and a custom Ruby Lithium API Wrapper, but the result is the same in Javascript) :l = Lithium.new => #<Lithium:0x007ff1b3daf758 @data={"basic_auth_login"=>"***", "basic_auth_password"=>"***", "domain"=>"***.fr", "login"=>"SmartPereNoel", "password"=>"***"}, @session_key=nil> l.get_session_key => "***" l.request('/messages/id/1123/ratings/key/question_metoo/ratings/add?rating.value=0', :post) => {"status"=>"success"} l = Lithium.new => #<Lithium:0x007ff1b3f5fa30 @data={"basic_auth_login"=>"***", "basic_auth_password"=>"***", "domain"=>"***.fr", "login"=>"APIUser", "password"=>"***"}, @session_key=nil> l.get_session_key => "***" l.request('/messages/id/2657/ratings/key/question_metoo/ratings/add?rating.value=0', :post) Lithium::LithiumError: [303: Forbidden]
Do you know of a special permission or setting to apply to users, so that they become able to add metto via APIs ?
Thanks !
--Stéphane Akkaoui
Related Content
- 4 years agoInactive User
- 7 months ago