Hello!
Im building a React app with the Javscript SDK and am having issues getting a refresh token and access tokens (browser-side, not backend).
Im setting up DropboxAuth
const dbxAuth = new DropboxAuth({
clientId: '90dgr7j93zv48ct',
clientSecret: process.env.REACT_APP_SECRET
})
then using it when my component mounts to get a token (using my OAuth code)
try {
dbxAuth
.getAccessTokenFromCode(null, process.env.REACT_APP_OAUTH_TOKEN)
.then((token) => {
console.log(`Token Result:${JSON.stringify(token)}`)
dbxAuth.setAccessToken(token.result.access_token)
})
} catch (error) {}
getAccessTokenFromCode is giving me a 400 error :
I cant figure out what i'm doing wrong