<?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 Can't get access token uses javascript fetch request in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/458596#M23601</link>
    <description>&lt;P&gt;Hi everyone, l try to get access token uses javascript fetch in the next way:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;fetch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://api.dropboxapi.com/oauth2/token" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/oauth2/token&lt;/A&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;, {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;method&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'POST'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;code&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;AUTHORIZATION_CODE&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;grant_type&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'authorization_code'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;redirect_uri&lt;/SPAN&gt;&lt;SPA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&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt; &lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'access data =&amp;gt;'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;catch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;err&lt;/SPAN&gt; &lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'access err =&amp;gt;'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;err&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;));&lt;BR /&gt;&lt;BR /&gt;I receive&amp;nbsp;AUTHORIZATION_CODE after successful redirecting from&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://www.dropbox.com/oauth2/authorize" target="_blank" rel="noopener"&gt;https://www.dropbox.com/oauth2/authorize&lt;/A&gt;..." domain.&lt;BR /&gt;&lt;BR /&gt;But I have an err like&lt;BR /&gt;{"error_description": "No auth function available for given request", "error": "invalid_request"}&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong? Because I follow curl request example from here:&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d code=&amp;lt;AUTHORIZATION_CODE&amp;gt; \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d grant_type=authorization_code \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d redirect_uri=&amp;lt;REDIRECT_URI&amp;gt; \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-u &amp;lt;APP_KEY&amp;gt;:&amp;lt;APP_SECRET&amp;gt;&lt;/PRE&gt;
&lt;SPAN&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 05 Oct 2020 04:55:03 GMT</pubDate>
    <dc:creator>Jenya Korolenko</dc:creator>
    <dc:date>2020-10-05T04:55:03Z</dc:date>
    <item>
      <title>Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/458596#M23601</link>
      <description>&lt;P&gt;Hi everyone, l try to get access token uses javascript fetch in the next way:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;fetch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://api.dropboxapi.com/oauth2/token" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/oauth2/token&lt;/A&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;, {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;method&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'POST'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;code&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;AUTHORIZATION_CODE&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;grant_type&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'authorization_code'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;redirect_uri&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;REDIRECT_URI&lt;/SPAN&gt;&lt;SPAN&gt;}${&lt;/SPAN&gt;&lt;SPAN&gt;window&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;location&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;pathname&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;&lt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;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;catch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;err&lt;/SPAN&gt; &lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'access err =&amp;gt;'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;err&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;));&lt;BR /&gt;&lt;BR /&gt;I receive&amp;nbsp;AUTHORIZATION_CODE after successful redirecting from&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://www.dropbox.com/oauth2/authorize" target="_blank" rel="noopener"&gt;https://www.dropbox.com/oauth2/authorize&lt;/A&gt;..." domain.&lt;BR /&gt;&lt;BR /&gt;But I have an err like&lt;BR /&gt;{"error_description": "No auth function available for given request", "error": "invalid_request"}&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong? Because I follow curl request example from here:&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d code=&amp;lt;AUTHORIZATION_CODE&amp;gt; \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d grant_type=authorization_code \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d redirect_uri=&amp;lt;REDIRECT_URI&amp;gt; \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-u &amp;lt;APP_KEY&amp;gt;:&amp;lt;APP_SECRET&amp;gt;&lt;/PRE&gt;
&lt;SPAN&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 Oct 2020 04:55:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/458596#M23601</guid>
      <dc:creator>Jenya Korolenko</dc:creator>
      <dc:date>2020-10-05T04:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459027#M23610</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/64178976/cant-get-access-token-in-dropbox-uses-javascript-fetch-request" target="_self"&gt;https://stackoverflow.com/questions/64178976/cant-get-access-token-in-dropbox-uses-javascript-fetch-request&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like there's a few issues with how you're formatting your request. For instance, it looks like you're not using the right encoding, and you're not properly labeling your client ID and secret. Here's a fixed up example of how you can do this:&lt;/P&gt;
&lt;PRE&gt;const params = new URLSearchParams({
    code: AUTHORIZATION_CODE,
    grant_type: 'authorization_code',
    redirect_uri: REDIRECT_URI,
    client_id: CLIENT_ID,
    client_secret: CLIENT_SECRET
});

fetch('https://api.dropboxapi.com/oauth2/token', {
    method: 'POST',
    body: params
})
.then(res =&amp;gt; res.json())
.then(data =&amp;gt; console.log('access data =&amp;gt;', data))
.catch(err =&amp;gt; console.log('access err =&amp;gt;',err));&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Oct 2020 15:12:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459027#M23610</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-10-05T15:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459128#M23613</link>
      <description>&lt;P&gt;Hey Greg!&lt;BR /&gt;&lt;BR /&gt;I thought I'd just join the discussion here since I have a very similar question. Can you provide an example of how to format a fetch request for creating a file request (documentation's here: &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create&lt;/A&gt;). Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 21:11:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459128#M23613</guid>
      <dc:creator>cascadeCommons</dc:creator>
      <dc:date>2020-10-05T21:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459340#M23614</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1357972"&gt;@cascadeCommons&lt;/a&gt;&amp;nbsp;The&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create" target="_self"&gt;/2/file_requests/create&lt;/A&gt;&amp;nbsp;endpoint is an&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#formats" target="_self"&gt;"RPC" style&lt;/A&gt; endpoint, so it does work a bit differently than the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_self"&gt;/oauth2/token&lt;/A&gt; endpoint.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calling&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create" target="_self"&gt;/2/file_requests/create&lt;/A&gt;&amp;nbsp;with fetch, for instance, would look like this, again building on the original example here:&lt;/P&gt;
&lt;PRE&gt;var headers = {
    'Authorization': "Bearer ACCESS_TOKEN",
    'Content-Type': "application/json"
};
var params = JSON.stringify({"title": "file request title", "destination": "/file request destination"});

fetch('https://api.dropboxapi.com/2/file_requests/create', {
    method: 'POST',
    body: params,
    headers: headers,
})
.then(res =&amp;gt; res.json())
.then(data =&amp;gt; console.log('access data =&amp;gt;', data))
.catch(err =&amp;gt; console.log('access err =&amp;gt;', err));&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 14:47:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459340#M23614</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-10-06T14:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459352#M23615</link>
      <description>&lt;P&gt;Thank you so much Greg for your quick reply, I really appreciate it.&lt;BR /&gt;&lt;BR /&gt;It seems that I had formatted my fetch request correctly, but the issue I was having was working with the response data. I checked my code using the&amp;nbsp; .ok property and I can confirm that the request is successful. In the example you provided, there were 2 .then() statements. I was wondering if you could provide some guidance on how to access properties of the response, such as the file request URL. For refernce, this is what the HTTP Documentation says should be returned.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbxFileReq.JPG" style="width: 955px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/18222i317E0B746DA8B60B/image-size/large?v=v2&amp;amp;px=999" role="button" title="dbxFileReq.JPG" alt="dbxFileReq.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 15:30:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459352#M23615</guid>
      <dc:creator>cascadeCommons</dc:creator>
      <dc:date>2020-10-06T15:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459362#M23616</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1357972"&gt;@cascadeCommons&lt;/a&gt;&amp;nbsp;Yes, I was just following the basic result/error handling pattern from the original post here, but you can handle the results/errors however you want. For reference, the API itself will return the result or error for an RPC style call in the HTTPS response body. A successful&amp;nbsp;call will return the result as JSON in the response body, for instance. (And, speaking of which, the original code here is technically incomplete as it doesn't account for error scenarios where the result isn't JSON. Apps should check the type of the response to handle it accordingly.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, anyway, to answer your actual question, you can access the 'url' property from the parsed JSON like this:&lt;/P&gt;
&lt;PRE&gt;.then(data =&amp;gt; console.log('created file request URL:', data.url))&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Oct 2020 15:47:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459362#M23616</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-10-06T15:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459377#M23617</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let options = {
	method: 'POST',
	headers: headers,
	body: params
};
fetch('https://api.dropboxapi.com/2/file_requests/create', options)
	.then(res =&amp;gt; res.json())
	.then(data =&amp;gt; {
		generated = data.url;
	})&lt;/PRE&gt;&lt;P&gt;Hey &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;, I've already initialized the `generated` variable. This fetch is part of a normal Javascript function, and that function returns the value of generated. i know that the fetch response goes through (as mentioned before), but I'm still unable to get the request URL. Is there any mistake you can see here?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 16:22:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459377#M23617</guid>
      <dc:creator>cascadeCommons</dc:creator>
      <dc:date>2020-10-06T16:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459397#M23618</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1357972"&gt;@cascadeCommons&lt;/a&gt;&amp;nbsp;I don't see anything obviously wrong here, but I don't see where you're actually returning or reading the 'generated' value, or are handling any potential errors, so there may be an issue in the parts of the code that were omitted.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 17:14:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459397#M23618</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-10-06T17:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459411#M23619</link>
      <description>&lt;PRE&gt;let requestURL = generateSubmission();&lt;/PRE&gt;&lt;P&gt;Hey &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;.&amp;nbsp;I've included some more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function I provided earlier is generateSubmission(). I've included how I called it above. My plan was for generateSubmission() to return the URL in string form so I could store it in the newly declared variable `requestURL`. Please let me know if you see anything wrong, any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 18:16:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459411#M23619</guid>
      <dc:creator>cascadeCommons</dc:creator>
      <dc:date>2020-10-06T18:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get access token uses javascript fetch request</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459420#M23620</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1357972"&gt;@cascadeCommons&lt;/a&gt;&amp;nbsp;It's still not clear where the value actually gets returned. In any case, we've strayed pretty far from the original topic here though, so to avoid spamming the original poster, please &lt;A href="https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014" target="_self"&gt;open a new thread&lt;/A&gt; with all of the relevant code needed to reproduce the issue if you still need help with it.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 18:59:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-t-get-access-token-uses-javascript-fetch-request/m-p/459420#M23620</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-10-06T18:59:15Z</dc:date>
    </item>
  </channel>
</rss>

