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!
@lcscamacho I have been able to send emails from outlook using the Email API Quickstart guide that I provided youâŚhave you tried with that one? Can you send me your project to alvaro.t@nylas.com
so that I can run it?
Hey Alvaro, thanks for your attention, this is an issue that other users might be facing as well, and I believe it would be beneficial if we could have your attention for 30 minutes in a Google Meet call. We plan to be using Nylas for a long time and have many clients who rely on your services!
Hello @lcscamacho I would need you to send me your project to my email, so that I can run and figure out whatâs missing or going wrongâŚIâm not a Node user so I need time to figure things out, but I need your full code (no API keys of course)
Hi @Blag I am also getting same error when I try to test grant from nylas v3 dashboard. I have completed Microsoft connector settings as mentioned in the document
Hello @Sharmila I would ask you the same, send me your code so that I can test it out and figure out whatâs wrongâŚmy email is on this thread.