Unauthorized error when trying to upload file through API V4

I resolved it, the error was that i was using /upload endpoint instead of api/upload. My bad :disappointed_relieved: