Home

Error 429 while sending messages to Teams

%3CLINGO-SUB%20id%3D%22lingo-sub-651732%22%20slang%3D%22en-US%22%3EError%20429%20while%20sending%20messages%20to%20Teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-651732%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20developed%20a%20script%20in%20python%20using%20incoming%20webhooks%20that%20sends%20messages%20to%20Teams.%20I%20cannot%20control%20messages%20to%20teams%20as%20it%20depends%20on%20how%20many%20alerts%20our%20hosts%20are%20generating%20at%20one%20go.%26nbsp%3B%20Recently%2C%20I%20have%20observed%20that%20my%20python%20script%20displays%20http%20response%20as%20%3CSTRONG%3E200%3C%2FSTRONG%3E%20but%20there%20is%20no%20messages%20in%20my%20channel.%20After%20further%20investigation%2C%20I%20found%20that%20there%20is%20an%20%3CSTRONG%3Ehttp%20error%20429%3C%2FSTRONG%3E%26nbsp%3Bwhen%20sending%20messages%20via%20curl.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurl%20Output%3A%20%3CEM%3E%22Webhook%20message%20delivery%20failed%20with%20error%3A%20Microsoft%20Teams%20endpoint%20returned%20HTTP%20error%20429%22%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPython%20Output%3A%20DEBUG%3Aurllib3.connectionpool%3AStarting%20new%20HTTPS%20connection%20(1)%3A%20outlook.office.com%3A443%3CBR%20%2F%3EDEBUG%3Aurllib3.connectionpool%3A%3CA%20href%3D%22https%3A%2F%2Foutlook.office.com%3A443%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office.com%3A443%3C%2FA%3E%20%22POST%20%2Fwebhook%2F1xxxxxxxxxxxxxxxxxxxxxxxx%2FIncomingWebhook%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxx%20HTTP%2F1.1%22%20200%20None%3CBR%20%2F%3E%3CRESPONSE%3E%3C%2FRESPONSE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CIMG%20border%3D%220%22%20width%3D%22999%22%20height%3D%2220%22%20%2F%3E%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20change%20the%20limit%20on%20teams%3F%20Becuase%20as%20said%2C%20I%20cannot%20control%20the%20incoming%20messsages%20as%20they%20are%20very%20important%20alerts.%20Also%2C%20why%20does%20python%20return%20200%20as%20http%20status%20where%20as%20curl%20is%20returning%20different%20error%20code%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-651732%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Sainath825
Occasional Visitor

I have developed a script in python using incoming webhooks that sends messages to Teams. I cannot control messages to teams as it depends on how many alerts our hosts are generating at one go.  Recently, I have observed that my python script displays http response as 200 but there is no messages in my channel. After further investigation, I found that there is an http error 429 when sending messages via curl.

 

Curl Output: "Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 429"

 

Python Output: DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): outlook.office.com:443
DEBUG:urllib3.connectionpool:https://outlook.office.com:443 "POST /webhook/1xxxxxxxxxxxxxxxxxxxxxxxx/IncomingWebhook/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 None
<Response [200]>

 

Is there a way to change the limit on teams? Becuase as said, I cannot control the incoming messsages as they are very important alerts. Also, why does python return 200 as http status where as curl is returning different error code?

Related Conversations