Comments
-
Sorry. I took the time to inspect the final request, which contains the access token in the request header. When I isolated the issue to the function, which contains the curl post/request, it came back with a successful response. So, to my embarrassment, there was actually just an issue somewhere else. I got really bogged…
-
I think I'm doing everything correctly. I think the issue is just due to the last request originitating from a local server without authentic SSL. The access tokens I'm receiving seem to work, just not from my local server. Thanks for your help.
-
I added request headers to my previous post, which follow each respective request. Thanks for your help. Let me know if you need more info.
-
My process starts with a request for authorization: function requestDropboxAuth() { $url = 'https://www.dropbox.com/oauth2/authorize'; $data = [ 'client_id' => '<client_id>', 'redirect_uri' => 'https://domain.com/validate/dropbox', 'response_type' => 'code' ]; header('Location: ' . $url . '?' . http_build_query($data));…
-
My issue is not with the code itself, because I've received a successful response when I've used it on phpfiddle.com. My issue is that I'm getting an error response on my local virtual server, and I have no clue why. I am hoping you may have some insight.
-
request: public function getDropboxMetadata($url, $token) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.dropboxapi.com/2/sharing/get_shared_link_metadata'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer ' . $token, 'Content-Type: application/json']); curl_setopt($ch, CURLOPT_POST, true);…