<?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: Malformed OAuth2 Access Token When Deployed to Vercel in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730326#M32303</link>
    <description>&lt;P&gt;I don't have full context on your different environments of course, but there could be non-obvious differences, e.g., in the versions of the platform, programming language, network client, etc., being used, exactly how the access token is stored/retrieved, or so on, between the different environments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To troubleshoot this, the next step would be for you to inspect the request being made from the deployed environment.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2023 21:10:37 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2023-11-16T21:10:37Z</dc:date>
    <item>
      <title>Malformed OAuth2 Access Token When Deployed to Vercel</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730083#M32281</link>
      <description>&lt;P&gt;So I just started using dropbox for a nextjs/react app and everything works fine exactly as it should when I run it locally, but when I deploy to vercel I get a 400 code and the '&lt;SPAN&gt;Error in call to API function "files/upload": The given OAuth 2 access token is malformed.' message. I've configured my environment variables correctly because all of the other api calls in my app work correctly when deployed. I'm guessing I need to configure something in the developer dashboard to allow the access token to work on the vercel app as well as locally but I'm unsure what it is I need to do as of now. Any help would be greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 07:56:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730083#M32281</guid>
      <dc:creator>hhjj49</dc:creator>
      <dc:date>2023-11-16T07:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed OAuth2 Access Token When Deployed to Vercel</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730215#M32287</link>
      <description>&lt;P&gt;Regardless of where/how you're performing the API call, the "The given OAuth 2 access token is malformed" error should indicate that the call failed because the access token provided in the "Authorization" header was not of the expected form. This isn't something you need to or can configure for the app on &lt;A href="https://www.dropbox.com/developers/apps" target="_self"&gt;the App Console&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest inspecting the actual request your deployed app is sending to the /2/files/upload endpoint to see what it is including in the "Authorization" header. I can't offer help with Vercel itself as that's not made by Dropbox, so you may need to refer to its documentation to see how you can inspect/debug it.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 15:21:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730215#M32287</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-16T15:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed OAuth2 Access Token When Deployed to Vercel</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730240#M32292</link>
      <description>&lt;P&gt;&lt;SPAN&gt;As far as I can tell the actual request from the deployed version is identical to the request sent by the local version that works correctly, and I'm unsure of what would be different with the request being made by the deployed version since it is the exact same code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the full error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DropboxResponseError: Response failed with a 400 code at /var/task/node_modules/dropbox/cjs/src/response.js:34:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async exportSpl (/var/task/.next/server/pages/api/exportSpotifyPlaylist.js:115:9) { status: 400, headers: Headers { [Symbol(map)]: [Object: null prototype] { 'cache-control': [Array], 'content-security-policy': [Array], 'x-content-type-options': [Array], 'content-type': [Array], 'accept-encoding': [Array], date: [Array], server: [Array], 'content-length': [Array], 'strict-transport-security': [Array], 'x-robots-tag': [Array], 'x-dropbox-response-origin': [Array], 'x-dropbox-request-id': [Array], connection: [Array] } }, error: 'Error in call to API function "files/upload": The given OAuth 2 access token is malformed.' }&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 16:47:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730240#M32292</guid>
      <dc:creator>hhjj49</dc:creator>
      <dc:date>2023-11-16T16:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed OAuth2 Access Token When Deployed to Vercel</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730286#M32297</link>
      <description>&lt;P&gt;Can you clarify what you mean when you say "As far as I can tell the actual request from the deployed version is identical to the request sent by the local version"? Were you able to actually inspect the raw content of the request being sent from the deployed version? The output you shared here only shows some of the response, not the request.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 18:55:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730286#M32297</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-16T18:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed OAuth2 Access Token When Deployed to Vercel</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730321#M32302</link>
      <description>&lt;P&gt;I mean that I am sure that the access token is the same for each, and that the same code I am running locally which works, is the code which is deployed and not working. what could be different if the access token and code are the same?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 20:57:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730321#M32302</guid>
      <dc:creator>hhjj49</dc:creator>
      <dc:date>2023-11-16T20:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed OAuth2 Access Token When Deployed to Vercel</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730326#M32303</link>
      <description>&lt;P&gt;I don't have full context on your different environments of course, but there could be non-obvious differences, e.g., in the versions of the platform, programming language, network client, etc., being used, exactly how the access token is stored/retrieved, or so on, between the different environments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To troubleshoot this, the next step would be for you to inspect the request being made from the deployed environment.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 21:10:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-OAuth2-Access-Token-When-Deployed-to-Vercel/m-p/730326#M32303</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-16T21:10:37Z</dc:date>
    </item>
  </channel>
</rss>

