<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Distinction between Oauth 2 and PHP Core API (PHP SDK) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207844#M10197</link>
    <description>If you want to use the HTTPS endpoints directly, that's possible using just curl. &lt;BR /&gt;&lt;BR /&gt;Here are some basic examples using curl in PHP:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1354/uploading-a-file-via-curl-in-php#t=201702211923322665017" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1354/uploading-a-file-via-curl-in-php#t=201702211923322665017&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/410/getting-account-information/1364/getting-space-usage-information-for-the-linked-user-via-curl-in-php#t=201702211923328624075" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/410/getting-account-information/1364/getting-space-usage-information-for-the-linked-user-via-curl-in-php#t=201702211923328624075&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/412/listing-a-folder/1370/listing-the-root-folder-via-curl-in-php-and-the-curl-extension#t=20170221192336214657" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/412/listing-a-folder/1370/listing-the-root-folder-via-curl-in-php-and-the-curl-extension#t=20170221192336214657&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/408/downloading-a-file/20965/downloading-a-file-with-metadata-via-curl-in-php#t=201702211923411507977" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/408/downloading-a-file/20965/downloading-a-file-with-metadata-via-curl-in-php#t=201702211923411507977&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/414/getting-a-shared-link-for-a-file-or-folder/24125/creating-a-shared-link-for-a-file-using-curl-in-php#t=201702211923392625782" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/414/getting-a-shared-link-for-a-file-or-folder/24125/creating-a-shared-link-for-a-file-using-curl-in-php#t=201702211923392625782&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;To get an access token for the end user's account, you need to implement the OAuth app authorization flow. You can find information on how that works here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/reference/oauth-guide" target="_blank"&gt;https://www.dropbox.com/developers/reference/oauth-guide&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The documentation for those endpoints can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#authorization&lt;/A&gt;</description>
    <pubDate>Tue, 21 Feb 2017 19:26:38 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-02-21T19:26:38Z</dc:date>
    <item>
      <title>Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207084#M10097</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm from Softaculous Ltd and we are now starting to integrate with Dropbox for Backups upload and download.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know the difference between your PHP Core API or PHP SDK and OAUTH 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, do you have something as FTP stream to upload a tar.gz file in parts?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:25:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207084#M10097</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2019-05-29T09:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207150#M10108</link>
      <description>&lt;P&gt;The &lt;A href="https://www.dropbox.com/developers-v1/core/sdks/php" target="_self"&gt;PHP Core SDK&lt;/A&gt;&amp;nbsp;is a PHP SDK for accessing &lt;A href="https://www.dropbox.com/developers-v1/core" target="_self"&gt;Dropbox API v1, a.k.a. the&amp;nbsp;Dropbox Core API&lt;/A&gt;. API v1 is &lt;A href="https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/" target="_self"&gt;deprecated&lt;/A&gt;&amp;nbsp;though, so you should no longer use that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should use &lt;A href="https://www.dropbox.com/developers" target="_self"&gt;API v2&lt;/A&gt; instead. We don't have an official PHP SDK for API v2, so you can either use a &lt;A href="https://www.dropbox.com/developers/documentation/communitysdks" target="_self"&gt;third party library&lt;/A&gt;&amp;nbsp;or call the &lt;A href="https://www.dropbox.com/developers/documentation/http/overview" target="_self"&gt;HTTPS endpoints&lt;/A&gt; directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OAuth is an authorization protocol, used by the&amp;nbsp;Dropbox API. API v1 supports OAuth 1 and OAuth 2. API v2 supports OAuth 2.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 18:12:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207150#M10108</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-02-16T18:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207769#M10195</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Greg,&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;If I make use of HTTPS endpoints directly to use API v2, do I have to include some Dropbox classes or direct curl call will work?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Also, I'm not able to understand how to use these endpoint URLs using PHP. Can you please give me an example?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I want to generate the auth token of the user's account, how can I do so and using which endpoint?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Feb 2017 14:02:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207769#M10195</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-02-21T14:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207844#M10197</link>
      <description>If you want to use the HTTPS endpoints directly, that's possible using just curl. &lt;BR /&gt;&lt;BR /&gt;Here are some basic examples using curl in PHP:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1354/uploading-a-file-via-curl-in-php#t=201702211923322665017" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1354/uploading-a-file-via-curl-in-php#t=201702211923322665017&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/410/getting-account-information/1364/getting-space-usage-information-for-the-linked-user-via-curl-in-php#t=201702211923328624075" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/410/getting-account-information/1364/getting-space-usage-information-for-the-linked-user-via-curl-in-php#t=201702211923328624075&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/412/listing-a-folder/1370/listing-the-root-folder-via-curl-in-php-and-the-curl-extension#t=20170221192336214657" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/412/listing-a-folder/1370/listing-the-root-folder-via-curl-in-php-and-the-curl-extension#t=20170221192336214657&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/408/downloading-a-file/20965/downloading-a-file-with-metadata-via-curl-in-php#t=201702211923411507977" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/408/downloading-a-file/20965/downloading-a-file-with-metadata-via-curl-in-php#t=201702211923411507977&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/414/getting-a-shared-link-for-a-file-or-folder/24125/creating-a-shared-link-for-a-file-using-curl-in-php#t=201702211923392625782" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/414/getting-a-shared-link-for-a-file-or-folder/24125/creating-a-shared-link-for-a-file-using-curl-in-php#t=201702211923392625782&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;To get an access token for the end user's account, you need to implement the OAuth app authorization flow. You can find information on how that works here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/reference/oauth-guide" target="_blank"&gt;https://www.dropbox.com/developers/reference/oauth-guide&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The documentation for those endpoints can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#authorization&lt;/A&gt;</description>
      <pubDate>Tue, 21 Feb 2017 19:26:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207844#M10197</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-02-21T19:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207954#M10207</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not able to understand how to make the PHP curl call, what all curl parameters are to be set, etc. I'm not able to understand how to fetch the user auth token using the authorization API:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank" rel="noopener noreferrer"&gt;https://www.dropbox.com/developers/documentation/h&lt;WBR /&gt;ttp/documentation#authorization&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using it like this. Please correct me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$post['response_type'] = 'token';
$post['client_id'] = '6i45k3fi9a1i9an';
$post['redirect_uri'] = get_current_url().'&amp;amp;auth_callback=1';
$url = 'https://www.dropbox.com/oauth2/authorize';
// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
//Set proxy 
//curl_proxy($ch);
// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));

curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Get response from the server.
$resp = curl_exec($ch); 
r_print($resp);
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 19:18:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207954#M10207</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-02-22T19:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207961#M10208</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made the following changes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;function get_current_url() {
$url = @($_SERVER["HTTPS"] != 'on') ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"];
$url .= ($_SERVER["SERVER_PORT"] != 80) ? ":".$_SERVER["SERVER_PORT"] : "";
$url .= $_SERVER["REQUEST_URI"];
return $url;
}
$url = 'https://www.dropbox.com/oauth2/authorize?response_type=token&amp;amp;client_id=6i45k3fi9a1i9an&amp;amp;redirect_uri='.get_current_url();
// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); 

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Get response from the server.
$resp = curl_exec($ch);
echo '&amp;lt;br /&amp;gt;Curl Error: '.curl_error($ch);
echo '&amp;lt;br /&amp;gt;Curl Response: ';
r_print($resp);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using this I get:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Invalid redirect_uri: "https://cpanel.nuftp.com:2083/cpsess5895978520/frontend/paper_lantern/softaculous/index.live.php": It must exactly match one of the redirect URIs you've pre-configured for your app (including the path).&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How do I specify the redirect URL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I want to redirect this auth process in a separate window, which when accepted by the user should return back to the current window. How do I do that?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 19:20:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/207961#M10208</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-02-22T19:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/208036#M10213</link>
      <description>&lt;P&gt;You're attempting to access /authorize by submitting an HTTP request to it via curl like you would for an API call, but /authorize is actually a web page the user should interact with in their browser, and not an API endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should construct the /authorize URL and then direct the user there in their browser. (Exactly how you do that will depend on your setup, e.g., your web framework.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The redirect_uri value should be the URL of the page where you want the user sent back to after they authorize your app. As a security measure, it needs to exactly match a redirect URI registered for your app via your app's page on the &lt;A href="https://www.dropbox.com/developers/apps" target="_blank"&gt;App Console&lt;/A&gt;. If it doesn't you'll get that error you posted.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 19:23:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/208036#M10213</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-02-22T19:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214113#M10935</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;The redirect_uri value should be the URL of the page where you want the user sent back to after they authorize your app. As a security measure, it needs to exactly match a redirect URI registered for your app via your app's page on the App Console. If it doesn't you'll get that error you posted.&lt;BR /&gt;The Redirect URI in our case may vary as we provide user the utility to authorize to our Dropbox APP from various pages. We probably cannot set all those URIs in the APP settings via our APP's page. How to handle this?</description>
      <pubDate>Fri, 31 Mar 2017 10:55:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214113#M10935</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-03-31T10:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214135#M10939</link>
      <description>I'm afraid I don't have a great solution for you, as OAuth 2 redirect URIs for the Dropbox API are required to be pre-registered exactly. I'll be sure to pass this along as feedback though.&lt;BR /&gt;&lt;BR /&gt;One thing you may be able to do instead is to use one static redirect URI but encode the necessary information in the 'state' parameter, and decode it as necessary after the redirect back to your app, to handle it as necessary:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#authorization&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;Alternatively, you could forgo using a redirect URI entirely. With the "code" flow, you can omit redirect_uri and have the user copy and paste the code manually. (Or, for the "token" flow, you can use &lt;A href="https://www.dropbox.com/1/oauth2/display_token" target="_blank"&gt;https://www.dropbox.com/1/oauth2/display_token&lt;/A&gt; as the redirect URI and have the user copy and paste the access token.)</description>
      <pubDate>Fri, 31 Mar 2017 14:15:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214135#M10939</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-31T14:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214516#M10988</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Can you please tell me some examples of usage of this API? How will I fetch the access token when the authorization is successfull and the user is redirected back to the uri as specified in tge redirect uri?&lt;/DIV&gt;
&lt;DIV&gt;Also, when I'm using this API, I'm getting the error of 'invalid response type code'.&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Apr 2017 06:13:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214516#M10988</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-04-04T06:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214583#M10992</link>
      <description>For the API calls itself, please refer to the samples I linked to earlier in this thread.&lt;BR /&gt;&lt;BR /&gt;For the OAuth app authorization flow, you may want to see how the PHP Core SDK did it, as the OAuth 2 app authorization flow is the same for API v1 and v2:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-php/blob/master/examples/web-file-browser.php#L21" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-php/blob/master/examples/web-file-browser.php#L21&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-php/blob/master/lib/Dropbox/WebAuth.php#L192" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-php/blob/master/lib/Dropbox/WebAuth.php#L192&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you're running in to any particular issues, feel free to post the relevant code and full output.</description>
      <pubDate>Tue, 04 Apr 2017 17:23:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214583#M10992</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-04-04T17:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214751#M11008</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.WebAuth.html" target="_blank"&gt;http://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.WebAuth.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the code here:&lt;/P&gt;
&lt;P&gt;$appInfo = dbx\AppInfo::loadFromJsonFile(...);&lt;/P&gt;
&lt;P&gt;what should be mentioned as parameters in&amp;nbsp;&lt;SPAN&gt;loadFromJsonFile(...)?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, I'm using the following code to fetch the user's ccess token:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;function get_current_url() {&lt;BR /&gt;$url = @($_SERVER["HTTPS"] != 'on') ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"];&lt;BR /&gt;$url .= ($_SERVER["SERVER_PORT"] != 80) ? ":".$_SERVER["SERVER_PORT"] : "";&lt;BR /&gt;$url .= $_SERVER["REQUEST_URI"];&lt;BR /&gt;return $url;&lt;BR /&gt;}&lt;BR /&gt;$url = '&lt;A href="https://www.dropbox.com/1/oauth2/authorize?client_id=&amp;lt;clientID&amp;gt;&amp;amp;response_type=code&amp;amp;redirect_uri='.get_current_url().'&amp;amp;state=abcdefghijklmnopqrstuvwxyz" target="_blank"&gt;https://www.dropbox.com/1/oauth2/authorize?client_id=&amp;lt;clientID&amp;gt;&amp;amp;response_type=code&amp;amp;redirect_uri='.get_current_url().'&amp;amp;state=abcdefghijklmnopqrstuvwxyz&lt;/A&gt;';&lt;BR /&gt;header("Location: ".$url);&lt;/P&gt;
&lt;P&gt;r_print($_GET['code']);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the error:&lt;/P&gt;
&lt;DIV id="errorbox"&gt;
&lt;H1&gt;Error (400)&lt;/H1&gt;
It seems the app you were using submitted a bad request. If you would like to report this error to the app's developer, include the information below.&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV class="orange-hotbox"&gt;
&lt;H4&gt;More details for developers&lt;/H4&gt;
&lt;P&gt;&lt;CODE&gt;unknown field "code"&lt;/CODE&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I'm not redirected back to the Redirect URI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please tell me what is missing here?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 16:22:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214751#M11008</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-04-05T16:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214763#M11012</link>
      <description>The loadFromJsonFile method is the way the PHP Core SDK loads configuration settings, and isn't itself relevant to the OAuth flow.&lt;BR /&gt;&lt;BR /&gt;Regarding the actual error you're getting, it looks like you're supplying a 'code' URL parameter, but that's not expected. As seen in the code you supplied, there is a 'response_type' parameter for which the value should be 'code'. &lt;BR /&gt;&lt;BR /&gt;If you need help with that, please supply the actual URL of the page for that error you're getting.&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:13:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214763#M11012</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-04-05T17:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214973#M11035</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;Regarding the actual error you're getting, it looks like you're supplying a 'code' URL parameter, but that's not expected. As seen in the code you supplied, there is a 'response_type' parameter for which the value should be 'code'. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I didn't exactly understand you here. Don't we have to provide the 'code' parameter in the URL? Then how do we do that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see in the code snippet I provided previously, I've used 'response type' parameter as 'code' only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The URL of the page where I'm writing the code is:&lt;/P&gt;
&lt;P&gt;http://localhost/soft/softaculous/enduser/index.live.php&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The URL to which Dropbox redirects after accessing this page is:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php&amp;amp;state=abcdefghijklmnopqrstuvwxyz" target="_blank"&gt;https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php&amp;amp;state=abcdefghijklmnopqrstuvwxyz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This asks for the Authentication permission on allowing which redirects here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAVlGD6hF4EEH6VXcsJYJQmxE&amp;amp;state=abcdefghijklmnopqrstuvwxyz" target="_blank"&gt;https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAVlGD6hF4EEH6VXcsJYJQmxE&amp;amp;state=abcdefghijklmnopqrstuvwxyz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And get the error:&lt;/P&gt;
&lt;DIV id="errorbox"&gt;
&lt;H1&gt;Error (400)&lt;/H1&gt;
It seems the app you were using submitted a bad request. If you would like to report this error to the app's developer, include the information below.&lt;BR /&gt;
&lt;DIV class="orange-hotbox"&gt;
&lt;H4&gt;More details for developers&lt;/H4&gt;
&lt;P&gt;&lt;CODE&gt;unknown field "code"&lt;/CODE&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 Apr 2017 06:04:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/214973#M11035</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-04-07T06:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215003#M11040</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I get a faster support? I really need to speed up things here.. Is it possible to contact you on skype or something?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 12:09:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215003#M11040</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-04-07T12:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215014#M11041</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm also trying to generate the oauth2 access token using the oauth1 token and token secret&amp;nbsp;in the following way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;function converttov2($access_token){&lt;BR /&gt;$cheaders = array('Authorization: Bearer &amp;lt;ACCESS_TOKEN&amp;gt;',
'Content-Type: application/json',
'Dropbox-API-Arg: {"oauth1_token":"'.$access_token['t'].'", "oauth1_token_secret":"'.$access_token['s'].'"}');
$ch = curl_init('https://api.dropboxapi.com/2/auth/token/from_oauth1');
curl_setopt($ch, CURLOPT_HTTPHEADER, $cheaders);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

echo '&amp;lt;br /&amp;gt;Response:';
echo $response;

echo '&amp;lt;br /&amp;gt;Curl Error: '.curl_error($ch);
curl_close($ch);
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting this as output:&lt;/P&gt;
&lt;P&gt;Response:Error in call to API function "auth/token/from_oauth1": Invalid HTTP header "Authorization": expecting "Basic" auth&lt;BR /&gt;Curl Error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please tell me what I'm doing wrong here?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 14:04:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215014#M11041</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-04-07T14:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215016#M11042</link>
      <description>&lt;P&gt;We're not currently set up to provide phone/Skype support but I'm happy to help on the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, you supplied this /authorize URL:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAVlGD6hF4EEH6VXcsJYJQmxE&amp;amp;state=abcdefghijklmnopqrstuvwxyz&lt;/PRE&gt;
&lt;P&gt;That does have a 'code' URL parameter, but it looks like it's supposed to be part of the redirect URI. It's not encoded though, so it gets sent as a parameter to the&amp;nbsp;Dropbox page. Instead, you would need to encode the entire redirect URI value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you have an extra redirect to /authorize anyway though, so that one shouldn't be necessary. You aren't supposed to provide the 'code' to Dropbox. Dropbox generates the authorization code and gives it to you. That is, the flow should look like this for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. User goes to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;http://localhost/soft/softaculous/enduser/index.live.php&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Your page there sends them to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;state=abcdefghijklmnopqrstuvwxyz&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php" target="_blank"&gt;https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;state=abcdefghijklmnopqrstuvwxyz&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Once the user authorizes the app, they're sent to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAVlGD6hF4EEH6VXcsJYJQmxE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Your app verifies the state, and uses the authorization code to get an access token.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 14:02:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215016#M11042</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-04-07T14:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215018#M11043</link>
      <description>&lt;P&gt;If you already have an OAuth 2 access token for the user, you don't need to call&amp;nbsp;/2/auth/token/from_oauth1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is an OAuth 1 access token you want to upgrade though, the issue is that the&amp;nbsp;/2/auth/token/from_oauth1 endpoint uses "&lt;A href="https://www.dropbox.com/developers/reference/auth-types#app" target="_self"&gt;app auth&lt;/A&gt;", so you shouldn't supply an OAuth 2 access token. That is, this line should be like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$cheaders = array('Authorization: Basic &amp;lt;base64(APP_KEY:APP_SECRET)&amp;gt;',&lt;/PRE&gt;
&lt;P&gt;The &lt;A href="https://www.dropbox.com/developers/reference/auth-types#app" target="_self"&gt;app auth documentation&lt;/A&gt;&amp;nbsp;has a sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, I redacted it for you, but for the sake of security, you should disable that access token that you posted. You can do so by revoking access to the app entirely, if the access token is for your account, here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/account/security" target="_blank"&gt;https://www.dropbox.com/account/security&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, you can disable just this access token using the API:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 14:06:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/215018#M11043</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-04-07T14:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/216468#M11220</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;That does have a 'code' URL parameter, but it looks like it's supposed to be part of the redirect URI. It's not encoded though, so it gets sent as a parameter to the&amp;nbsp;Dropbox page. Instead, you would need to encode the entire redirect URI value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Can you please provide me with an example? Also how do you suggest we should encode the URL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I followed the exact steps as specified by you in the previous response:&lt;/P&gt;
&lt;P&gt;1. User goes to:&lt;/P&gt;
&lt;P&gt;http://localhost/soft/softaculous/enduser/index.li&lt;WBR /&gt;ve.php&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. The page there sends them to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;state=abcdefghijklmnopqrstuvwxyz&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php" target="_blank" rel="noopener noreferrer"&gt;https://www.dropbox.com/1/oauth2/authorize?client_&lt;WBR /&gt;id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;state=abcdef&lt;WBR /&gt;...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Once the user authorizes the app, &amp;nbsp;I'm redirected to the URI:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;state=abcdefghijklmnopqrstuvwxyz&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAYNqniSjVvXFo9mOqJ4qALX4" target="_blank"&gt;https://www.dropbox.com/1/oauth2/authorize?client_id=6i45k3fi9a1i9an&amp;amp;response_type=code&amp;amp;state=abcdefghijklmnopqrstuvwxyz&amp;amp;redirect_uri=http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAYNqniSjVvXFo9mOqJ4qALX4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and get the error specified previously. (&lt;CODE&gt;unknown field "code"&lt;/CODE&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally, I should be redirected to '&lt;SPAN&gt;http://localhost/soft/softaculous/enduser/index.live.php?state=abcdefghijklmnopqrstuvwxyz&amp;amp;code=ttlP27R0ozAAAAAAAAAAYNqniSjVvXFo9mOqJ4qALX4&lt;/SPAN&gt;' as specified by the Redirect URI but I'm not redirected to that URI for some reason and instead getting the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the APP, I specified the Redirect URI as:&amp;nbsp;&lt;SPAN&gt;http://localhost/soft/softaculous/enduser/index.live.php&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Awaiting your reply.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 15:18:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/216468#M11220</guid>
      <dc:creator>Priya M.</dc:creator>
      <dc:date>2017-04-17T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Distinction between Oauth 2 and PHP Core API (PHP SDK)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/216509#M11230</link>
      <description>It looks like you have an extra redirect in the flow you have implemented. Specifically, you shouldn't be doing step 3. You should only direct the user to /oauth2/authorize once. It appears your app is directing them again a second time, including the extra 'code' parameter the second time.&lt;BR /&gt;&lt;BR /&gt;This blog post may be helpful:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.dropbox.com/developers/2013/07/using-oauth-2-0-with-the-core-api/" target="_blank"&gt;https://blogs.dropbox.com/developers/2013/07/using-oauth-2-0-with-the-core-api/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;When encoding URL parameters, you can use whatever standard URL encoding library is available on your platform.</description>
      <pubDate>Mon, 17 Apr 2017 18:09:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Distinction-between-Oauth-2-and-PHP-Core-API-PHP-SDK/m-p/216509#M11230</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-04-17T18:09:40Z</dc:date>
    </item>
  </channel>
</rss>

