0 votes

i write the following code
imap = new Imap();
OutlookApi api = new OutlookApi(accessToken);
imap.ConnectSSL(Host, Port);
imap.LoginOAUTH2(api.GetEmail(), accessToken);

but code "The remote server returned an error: (420) Request Throttled"
Exception

by

1 Answer

0 votes

Remote server is simply saying, that you are performing too much operations within a time frame.

This may indicate too many logon attempts or too many IMAP commands/data send/received.

I don't know exact Outlook.com limits unfortunately.

For Office 365 they are:
ImapMaxConcurrency : 20
ImapMaxBurst : 240000
ImapRechargeRate : 360000
ImapCutoffBalance : 600000

The way throttling has been implemented in Exchange 2013 is that each
user receives a MaxBurst value - this is the "budget", or amount of
work they can do in a 1 hour period without being throttled. At the
same time, as the budget is being used, we are "recharging" the budget
(Recharge Rate). If you use up your MaxBurst value, we will begin
inserting MicroDelays. Basically this means that we will begin slowing
down our responses to commands. You won't know this is happening, as
it is designed to not be intrusive to the end-user. It is only when
you reach the CutoffBalance that we issue a backoff exception. At this
point, you would see the error responses due to invalid state.

There is nothing you can do about, but back off and perform fewer operations.

by (297k points)
...