I\'m able to successfully fetch an access_token from having the user login via oauth (parameter: code) etc. However, each time I attempt to post the authorization header (via ph
This error is apparently due to sending the OAuth token as OAuth instead of Bearer in the curl request.
This triggered the above error:
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: 0', 'Authorization: OAuth '.$token) );
This yielded the successful response:
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: 0', 'Authorization: Bearer '.$token) );