<?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 No auth function available for given request js sdk in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712130#M3575</link>
    <description>&lt;P&gt;I am using the js sdk like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const client = new dropbox.Dropbox({
  accessToken: config.accessToken,
  clientId: config.appKey,
  clientSecret: config.secretKey,
});

dbx.auth.setRefreshToken(config.refreshToken);

await client.filesUpload({
  path: '/folder/image.jpg',
  contents: buffer,
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I am getting this error&lt;/P&gt;
&lt;P&gt;'No auth function available for given request'&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 15:34:54 GMT</pubDate>
    <dc:creator>isaacfink</dc:creator>
    <dc:date>2023-09-07T15:34:54Z</dc:date>
    <item>
      <title>No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712130#M3575</link>
      <description>&lt;P&gt;I am using the js sdk like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const client = new dropbox.Dropbox({
  accessToken: config.accessToken,
  clientId: config.appKey,
  clientSecret: config.secretKey,
});

dbx.auth.setRefreshToken(config.refreshToken);

await client.filesUpload({
  path: '/folder/image.jpg',
  contents: buffer,
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I am getting this error&lt;/P&gt;
&lt;P&gt;'No auth function available for given request'&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 15:34:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712130#M3575</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T15:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712164#M3576</link>
      <description>&lt;P&gt;In the code you shared here, you're not supplying the refresh token to the "client" object that you're attempting the upload with. You're supplying the refresh token to a different "dbx" object".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure you're giving the refresh token to the correct Dropbox object, e.g., your "client" variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, note that the Dropbox object will need the following credentials in order to automatically perform the refresh, so make sure you're supplying all of these to the same object:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the refresh token&lt;/LI&gt;
&lt;LI&gt;the app key used to retrieve that refresh token&lt;/LI&gt;
&lt;LI&gt;only if the refresh token was not retrieved using PKCE: the app secret used to retrieve that refresh token&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 07 Sep 2023 15:53:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712164#M3576</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-07T15:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712172#M3577</link>
      <description>The dbx was a typo, it's actually correct in my code but it still doesn't work</description>
      <pubDate>Thu, 07 Sep 2023 16:21:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712172#M3577</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T16:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712182#M3578</link>
      <description>&lt;P&gt;In that case, please double check that you're supplying the correct credentials as outlined in my previous message, e.g., make sure you're using the correct app key/secret for that particular refresh token, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 16:59:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712182#M3578</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-07T16:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712191#M3579</link>
      <description>&lt;P&gt;I tried all of the above, I made sure the tokens and secrets are all correct but still nothing&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 17:18:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712191#M3579</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T17:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712193#M3580</link>
      <description>&lt;P&gt;I'll be happy to look into this further, but I'll need some more information. Please reply with:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the version number of the JavaScript SDK you're using&lt;/LI&gt;
&lt;LI&gt;the steps to reproduce the issue, including the actual code, but don't include any access token, refresh token, or app key/secret themselves&lt;/LI&gt;
&lt;LI&gt;the full text of the unexpected output/error&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 07 Sep 2023 17:23:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712193#M3580</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-07T17:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712199#M3581</link>
      <description>&lt;P&gt;Thanks, here is the information you asked for&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:dropbox@10.34.0" target="_blank"&gt;dropbox@10.34.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is what I did, I created an app and went to this url&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropboxforum.com/" target="_blank"&gt;https://www.dropbox.com/oauth2/authorize?client_id=&amp;lt;CLIENT_ID&amp;gt;&amp;amp;response_type=code&amp;amp;token_access_type=offline&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I got redirected to this screen&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20230907-puv.png" style="width: 800px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/40402iFE76779D94DE9FB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="SCR-20230907-puv.png" alt="SCR-20230907-puv.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I then entered this in my terminal&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl https://api.dropbox.com/oauth2/token \
    -d code=&amp;lt;the code I got from the previous image&amp;gt; \
    -d grant_type=authorization_code \
    -d client_id=&amp;lt;APP KEY&amp;gt; \
    -d client_secret=&amp;lt;APP SECRET&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and got a response object&lt;/P&gt;&lt;P&gt;In my js script I have the following code&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;const client = new dropbox.Dropbox({
  accessToken: config.accessToken,
  clientId: config.appKey,
  clientSecret: config.secretKey,
  refreshToken:config.refreshToken
});

client.auth.setRefreshToken(config.refreshToken);

await client.filesUpload({
  path: '/folder/image.jpg',
  contents: buffer,
});&lt;/LI-CODE&gt;&lt;P&gt;the access token and refresh token are what I got from the response from the curl request&lt;/P&gt;&lt;P&gt;I tried removing the refresh token in the class init and removing the client.auth.setRefreshToken but whatever combination of those I try gives me that error, I tried removing the accessToken an/or the clientId but nothing helped&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 17:41:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712199#M3581</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T17:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712201#M3582</link>
      <description>&lt;P&gt;The full text of the error is this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  name: "DropboxResponseError",
  status: 400,
  headers: {
  },
  error: {
    error: "invalid_request",
    error_description: "No auth function available for given request",
  },
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 07 Sep 2023 17:45:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712201#M3582</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712214#M3583</link>
      <description>&lt;P&gt;This looks correct. I also just tried this all myself and it worked successfully for me. (Setting refreshToken on dropbox.Dropbox and also calling setRefreshToken is redundant, but it shouldn't cause this issue as long as you're using the correct value.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please double check that you have copied in all of the values correctly, and didn't accidentally modify, misplace, or omit any of the values. For instance, your code here doesn't show how 'config' is set, so I can't replicate that exactly. I suggest printing out each each config value before you use them so you can check them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, make sure:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;'config.appKey' is the same as the 'client_id' in the /oauth2/authorize URL that resulted in the authorization code&lt;/LI&gt;
&lt;LI&gt;'config.secretKey' is the app secret that corresponds to the app key in 'config.appKey'&lt;/LI&gt;
&lt;LI&gt;'config.appKey' is the same as the 'client_id' used in the /oauth2/token call&lt;/LI&gt;
&lt;LI&gt;'config.secretKey' is the same as the 'client_secret' used in the /oauth2/token call&lt;/LI&gt;
&lt;LI&gt;'config.refreshToken' is exactly the 'refresh_token' returned by /oauth2/token, and is a different string than each of the app key, app secret, access token, and authorization code&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 07 Sep 2023 18:20:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712214#M3583</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-07T18:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: No auth function available for given request js sdk</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712216#M3584</link>
      <description>&lt;P&gt;Turns out the secret key was undefined, so much for avoiding typescript, thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 18:27:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/No-auth-function-available-for-given-request-js-sdk/m-p/712216#M3584</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T18:27:26Z</dc:date>
    </item>
  </channel>
</rss>

