Hi im using an html simple Form where i ask users to upload their documentation. Everything seems the work fine but after 1 day i get an error. I generate anothe acces token and seems to work fine again, but then after 1 day it fails again. How can i get an access token that will not expired or stop working?
// Subir archivos a Dropbox
var accessToken = 'ACCES TOKEN';
var dbx = new Dropbox.Dropbox({ accessToken: accessToken });
if (selfieFile) {
dbx.filesUpload({ path: '/' + selfieFile.name, contents: selfieFile })
.then(function(response) {
console.log('Selfie subida correctamente: ' + response.name);
})
.catch(function(error) {
console.error(error);
alert('Error al subir la selfie.');
});
} else {
alert('Por favor, selecciona un archivo de selfie.');
}
if (identificationFile) {
dbx.filesUpload({ path: '/' + identificationFile.name, contents: identificationFile })
.then(function(response) {
alert('Archivo subido correctamente: ' + response.name);
})
.catch(function(error) {
console.error(error);
alert('Error al subir el archivo.');
});
} else {
alert('Por favor, selecciona un archivo de identificación.');
}