I tryng to upload imagem and video via REST API but i get this Uncaught exception ‘OAuthException2’ with message 'Request failed with code 414, i convert o base64 as bellow.
$file = file_get_contents(‘test_files/_1.jpg’);
$payload = base64_encode($file);
I can confirm that I was also can produce the same error message as you and can confirm that changing GET to POST on the callService Function fixes the problem.
You can call with GET or POST. GET will be limited in length however.
The purpose of the tutorial is to give a flavour of how to access the API so it’s not a bug as such. Just that for the purposes of the tutorial GET worked fine.
If you’re then modifying that for your own purposes then that and other modifications may be necessary