Need help using xibo api

I’m starting using xibo api rn and i’m trying to make easy to upload new files and to schedule them… At the moment I’m able to schedule a campaign into a channel group but i’m a little confused about upload to library.
Im using php functions to get auths and this is my code for uploading:

CURLOPT_URL => “http://mySite/MyFolder/api/library?envelope=1”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => array(‘files’ => $_FILES[“UploadedMedia”], ‘expires’ => $fechaExpiracion),

As I’m posting media from a previus page which has a form and a input file… pretty standard.
Think is… it doesn’t work. Maybe it’s obvious but I’m not an experienced user of apis or web development. I supposed that’s not the way i’m supposed to upload new media but I cant figure out what should I do since i’m a complete newby.
Please, help!
Thanks in Advance: Marco

Figured it out, it was all about my post method. ty

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.