5 Replies Latest reply on Jul 17, 2015 3:29 PM by jeph.yang

    Need help with updating a profile field using REST

    larry.enzer

      Hello team:

       

      I am trying to update a profile field using the people web hook. It is always giving me an access denied. 403 (Forbidden) error and never running using the code below in JQUERY.

       

                $.ajax({

                              url:'https://mcgrawhill-internal-v7.uat5.hosted.jivesoftware.com/api/core/v3/people/27257',

                              dataType: 'json',

                              method: 'PUT',

                              dataFilter: function(data, type) {

                                  return (type === 'json' && data) ? $.trim(data.replace(/^throw [^;]*;/, '')) : data;

                              },

                             data:

                             { "profile" : [ {

                                 "jive_label" : "policy role",

                                 "value" : "NEW POLICY"

                                 } ]

                            },

                           success: function(places) {

                                   console.log("SUCCESS");

                                   console.log(places);

                            },

                            error: function() {

                                   console.log('error', arguments);

                            }

              });

       

      Could someone assist me as to how to fix my code? It would be most appreciated.

       

      Thanks you,

       

      Larry