<?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: Need help with script and authentication in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677748#M3321</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1681751"&gt;@pankajetal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... I'm able to make the powershell script work using my access token but it won't work for other users.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;$token= "&lt;A href="https://www.dropbox.com/oauth2/authorize?client_id=" target="_blank" rel="noopener"&gt;https://www.dropbox.com/oauth2/authorize?client_id=&lt;/A&gt;&amp;lt;my app ID&amp;gt;&amp;amp;response_type=code"&lt;BR /&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1681751"&gt;@pankajetal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Since you can make you script work with access token, does the token that work for you look like the one you assigned above? 🧐&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@488936AC5FA64023548E32631AFD9803/emoticons/1f600.png" alt=":grinning_face:" title=":grinning_face:" /&gt;&lt;/P&gt;&lt;P&gt;The above "token" is a web address where Dropbox OAuth starts. That's the place where you should redirect user to grant your application access to the data. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; You can take a look &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Issue-in-generating-access-token/m-p/592921/highlight/true#M27586" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for step by step exercise. There 'curl' is in use; I believe you can "translate" it for pawershell use.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2023 23:27:20 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2023-04-18T23:27:20Z</dc:date>
    <item>
      <title>Need help with script and authentication</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677722#M3320</link>
      <description>&lt;P&gt;Hi- I'm working on a project when I need to download different user files from dropbox to a network share (to be consumed by some other application).&lt;/P&gt;&lt;P&gt;I've very limited knowledge of powershell script and authentication. I'm able to make the powershell script work using my access token but it won't work for other users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to capture the access code generated and pass it as token but I'm getting "The given OAuth 2 access token is malformed" error. Is the below even correct? Please help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$token= "&lt;A href="https://www.dropbox.com/oauth2/authorize?client_id=" target="_blank"&gt;https://www.dropbox.com/oauth2/authorize?client_id=&lt;/A&gt;&amp;lt;my app ID&amp;gt;&amp;amp;response_type=code"&lt;BR /&gt;$destination = "\\serverlocation\file.extension"&lt;BR /&gt;$headers = @{&lt;BR /&gt;'Authorization' = "Bearer " + $token&lt;BR /&gt;'Dropbox-API-Arg' = '{"path": "/Dropboxfolder/file.extension"}'&lt;BR /&gt;}&lt;BR /&gt;Invoke-RestMethod -Method Post -Uri &lt;A href="https://content.dropboxapi.com/2/files/download" target="_blank"&gt;https://content.dropboxapi.com/2/files/download&lt;/A&gt; -Headers $headers -ContentType 'application/octet-stream; charset=utf-8'-OutFile $destination&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 20:45:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677722#M3320</guid>
      <dc:creator>pankajetal</dc:creator>
      <dc:date>2023-04-18T20:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with script and authentication</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677748#M3321</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1681751"&gt;@pankajetal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... I'm able to make the powershell script work using my access token but it won't work for other users.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;$token= "&lt;A href="https://www.dropbox.com/oauth2/authorize?client_id=" target="_blank" rel="noopener"&gt;https://www.dropbox.com/oauth2/authorize?client_id=&lt;/A&gt;&amp;lt;my app ID&amp;gt;&amp;amp;response_type=code"&lt;BR /&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1681751"&gt;@pankajetal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Since you can make you script work with access token, does the token that work for you look like the one you assigned above? 🧐&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@488936AC5FA64023548E32631AFD9803/emoticons/1f600.png" alt=":grinning_face:" title=":grinning_face:" /&gt;&lt;/P&gt;&lt;P&gt;The above "token" is a web address where Dropbox OAuth starts. That's the place where you should redirect user to grant your application access to the data. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; You can take a look &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Issue-in-generating-access-token/m-p/592921/highlight/true#M27586" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for step by step exercise. There 'curl' is in use; I believe you can "translate" it for pawershell use.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 23:27:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677748#M3321</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-04-18T23:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with script and authentication</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677921#M3322</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1681751"&gt;@pankajetal&lt;/a&gt;&amp;nbsp;Здравко is correct; &lt;A href="https://www.dropbox.com/oauth2/authorize" target="_blank"&gt;https://www.dropbox.com/oauth2/authorize&lt;/A&gt; is a web page, not a token or API call. You can find more information on how this works in the following resources:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank"&gt;https://developers.dropbox.com/oauth-guide&lt;/A&gt;&lt;/LI&gt;
&lt;LI&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;/LI&gt;
&lt;LI&gt;&lt;A href="https://dropbox.tech/developers/using-oauth-2-0-with-offline-access" target="_blank"&gt;https://dropbox.tech/developers/using-oauth-2-0-with-offline-access&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 19 Apr 2023 13:16:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Need-help-with-script-and-authentication/m-p/677921#M3322</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-04-19T13:16:03Z</dc:date>
    </item>
  </channel>
</rss>

