[23:00:30] AuthUrl: https://www.fitbit.com/oauth2/authorize?response_type=token&client_id=22D8J2&redirect_uri=https%3A%2F%2Fauth.expo.io%2F%40geniustanley%2Fntuh-ai-lifestyle&scope=activity%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight&expires_in=100
[23:00:34] {"type":"success","params":{"exp://172.20.10.9:19000/--/expo-auth-session":"","access_token": "my_token","user_id":"6WGCFC","scope":"weight social profile location settings activity sleep nutrition heartrate","token_type":"Bearer","expires_in":"579536"}}and this is my async function
try {
console.log(`AuthUrl: ${AUTH_URL}`);
let authResult = await AuthSession.startAsync({
authUrl: AUTH_URL
});
if (authResult.type !== "success") {
return;
}
console.log(JSON.stringify(authResult));
return authResult.params.access_token;
} catch (e) {
console.error(e);
return null;
}
While I request an access_token expires in 100s, why it returns 579536
Thanks~
Answered! Go to the Best Answer.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
These are the values we support for the "expired_in" parameter
86400 for 1 day (default)604800 for 1 week2592000 for 30 days31536000 for 1 year
Gordon
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
These are the values we support for the "expired_in" parameter
86400 for 1 day (default)604800 for 1 week2592000 for 30 days31536000 for 1 year
Gordon