sebbmeyer / php-microsoft-teams-connector

PHP Microsoft Teams Connector
MIT License
111 stars 22 forks source link

Send() sends message, but returns error #21

Closed neologyc closed 2 years ago

neologyc commented 3 years ago

Hello.

I´m getting error after sending Simple Card. but the message is sent to Teams correctly.

The error is: Fatal error: Uncaught Exception: Error response: ok in /data/web/virtuals/91417/virtual/www/****/php/library/vendor/sebbmeyer/php-microsoft-teams-connector/src/TeamsConnector.php:46 Stack trace: #0 /data/web/virtuals/91417/virtual/www/****/php/odkaz.php(190): Sebbmyr\Teams\TeamsConnector->send(Object(Sebbmyr\Teams\Cards\SimpleCard), 20, 10) #1 {main} thrown in /data/web/virtuals/91417/virtual/www/****/php/library/vendor/sebbmeyer/php-microsoft-teams-connector/src/TeamsConnector.php on line 46

My code is:

require_once __DIR__ . '/library/vendor/autoload.php'; $connector = new Sebbmyr\Teams\TeamsConnector('https://teams.szn.cz/hooks/mycorrectincominghookid:-)'); $card = new \Sebbmyr\Teams\Cards\SimpleCard(['title' => 'Simple card title', 'text' => $message]); // $message contains Markdown code $connector->send($card ,$timeut = 20, $connectTimeout = 10);

Totally can´t find the problem.

Thank you for help.

k9barry commented 3 years ago

Check the spelling of

$timeut = 20,

On Sep 22, 2021, at 6:59 PM, Neologyc @.***> wrote:

 Hello.

I´m getting error after sending Simple Card. but the message is sent to Teams correctly.

The error is: Fatal error: Uncaught Exception: Error response: ok in /data/web/virtuals/91417/virtual/www//php/library/vendor/sebbmeyer/php-microsoft-teams-connector/src/TeamsConnector.php:46 Stack trace: #0 /data/web/virtuals/91417/virtual/www//php/odkaz.php(190): Sebbmyr\Teams\TeamsConnector->send(Object(Sebbmyr\Teams\Cards\SimpleCard), 20, 10) #1 {main} thrown in /data/web/virtuals/91417/virtual/www/****/php/library/vendor/sebbmeyer/php-microsoft-teams-connector/src/TeamsConnector.php on line 46

My code is:

require_once DIR . '/library/vendor/autoload.php'; $connector = new Sebbmyr\Teams\TeamsConnector('https://teams.szn.cz/hooks/mycorrectincominghookid:-)'); $card = new \Sebbmyr\Teams\Cards\SimpleCard(['title' => 'Simple card title', 'text' => $message]); // $message contains Markdown code $connector->send($card ,$timeut = 20, $connectTimeout = 10);

Totally can´t find the problem.

Thank you for help.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sebbmeyer commented 3 years ago

@neologyc did the code spelling fix solve your problem?

sebbmeyer commented 2 years ago

No response, seems to be solved