Forum Discussion
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.
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
- 6 months ago