User Avatar API Endpoint 404 on POST, 200 on GET

I am trying to update a users avatar using the REST API. I am getting a 200 when using a GET request, and retirving the users current Avatar. When I try to update the Avatar with a PUT or POST, I get a 404 error. Am I doing something wrong or need to configure something?

Parents Reply
  • Thank you!

    Now I am trying to execute this REST API call from Javascript so I can create an automation that randomizes users Avatars, but I am getting a 404 error from the Automation Studio.

    var url="http://localhost:8000/api.ashx/v2/users/2114/avatar.json";
    var Data= '{"userid": 2114, AvatarUrl": "'+images[random]+'"}';
    var httpResponseResponse = core_v2_http.Post(url, { Data: Data, Headers: {"Request-Method": "PUT","Rest-User-Token": '<TOKEN>', 'Content-Type': 'application/json'}});
    return httpResponseResponse;

Children