This project is read-only.

Creating media

Oct 17, 2012 at 2:51 PM


I've got the auth and list of media items working without an issue, but cannot create a folder in the media content area. I am using c# and restsharp currently.

I POST to /rest/media and just get FORBIDDEN back. What confuses me is the listing of the media works so the token is correct.

I was wondering if you could provide any pointers.

Below is the basic code.

var request = new RestRequest("media", Method.POST);            request.AddParameter("auth_username", token.Username);            request.AddParameter("auth_token", token.Value);            request.AddParameter("MediaTypeAlias", "folder");           

request.AddParameter("Name", folderName);