<?php
$code = "xxxxxx";
$client_id = "xxxxx";
$client_secret = "xxxxxxxx";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dropbox.com/oauth2/token");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=authorization_code&code=$code&client_id=$client_id&client_secret=$client_secret");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response, true);
$refresh_token = $response['refresh_token'];
echo "Refresh Token: $refresh_token";
?>
Co bych zase mohl z vrtat ? díky