How to resolve error: provider_code_request_failed 45001 400 Provider refused to return refresh_token using code (hosted auth) Provider??? no have solution
Hello @lcscamacho could you please provide your source so that I can take a look? Also the full error that youâre gettingâŚ
Microsoft, im trying this and get error 45001 from microsoft provider: const authUrl = nylas.auth.urlForOAuth2({
clientId: config.clientId,
provider: âmicrosoftâ,
redirectUri: config.callbackUri,
loginHint: âemail_to_connectâ,
})
Have you created your connector? Start using the Nylas Sandbox | Nylas Docs
Also, hereâs a Microsoft guide on our docs Use Microsoft accounts and data with Nylas | Nylas Docs
i m following this guide Create grants with OAuth and an API key | Nylas Docs and this video https://www.youtube.com/watch?v=8luB4dJggtI&list=PLk-4iahO3b-xd42-RL4DJQyuEoFFYwTbC&index=80
I seeâŚI did followed the video as well although it worked for meâŚcould you post your source code? No need to post any keys obviouslyâŚjust want to see whatâs going wrongâŚwhich SDK are you using?
Also, have you tried with our QuickStart guides? Email API Quickstart: read and send email messages | Nylas Docs
yess, of course! this code: interface AuthInNylasToGetGrantIdProps {
urlCallback: string;
provider?: âgoogleâ | âmicrosoftâ;
}
export const authInNylasToGetGrantId = async ({
urlCallback,
provider = âgoogleâ,
}: AuthInNylasToGetGrantIdProps) => {
const config = {
clientId: nylasConfigValidated.clientId,
callbackUri: urlCallback,
apiKey: nylasConfigValidated.apiKey,
apiUri: âhttps://api.us.nylas.comâ,
};
const nylas = new Nylas({
apiKey: config.apiKey,
apiUri: config.apiUri,
});
const authUrl = nylas.auth.urlForOAuth2({
clientId: config.clientId,
provider,
redirectUri: config.callbackUri,
state: provider,
});
return { url: authUrl };
};
Thanks @lcscamacho I will take a look and let you knowâŚitâs already nighttime for me
good morning !! oh yes i wait
A couple of thingsâŚif youâre using Microsoft, you should mention Google at allâŚ
Have you registered your callbackUri on the dashboard?
Otherwise, I donât anything wrong with your code
Again, have you take a look at this? Email API Quickstart: read and send email messages | Nylas Docs
I need sendo emails from Outlook of my client!