I am able to perform the functionalities of Authentication, receiving the Access Token and upload and download of files from Dropbox using this SDK. However i want to be able to implement this functionality on a local html page. Basically, i used the Dropbox SDK at the script and im going by the example given
<script src="https://unpkg.com/dropbox/dist/Dropbox-sdk.min.js"></script>
For authentication the steps are to provide a client ID and a redirect URI, in the example they have used a static client ID and we need to pass the redirect URI in the dbx.getAuthenticationUrl function, this sets the redirect uri as the href of a link which is basically the authentication link which goes to the page where the user logs and is redirected to the redirect URI provided, where we take the access token to be used for further operations. On trying multiple redirect URI's i am getting the same error for which ever URI i provide
More details for developers
Invalid redirect_uri: "http://localhost/redirect.html": It must exactly match one of the redirect URIs you've pre-configured for your app (including the path).
This file is valid, but the message persists. Do i need to redirect to any other URL, i have tried a URL of a file on a server which is correct as the file opens when i try that url in the browser. In the example they redirect to the same URI http://localhost:8080, NO OTHER, even the port number, if i change the port number it shows the same error and only works at 8080. What am i missing? Is there any other place where the url is specified? I am only specifying it like in the example html file
var dbx = new Dropbox({ clientId: CLIENT_ID });
var authUrl = dbx.getAuthenticationUrl('http://localhost:8080/auth');