Skip to content

BrevoRequestParser::doParse() failed on Contact event #60399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
julienbornstein opened this issue May 11, 2025 · 1 comment
Closed

BrevoRequestParser::doParse() failed on Contact event #60399

julienbornstein opened this issue May 11, 2025 · 1 comment

Comments

@julienbornstein
Copy link

Symfony version(s) affected

7.2.0

Description

On Brevo webhook contact events, the received remote event is reject (RejectWebhookException) because some supposed expected parameters are missing (eg: message-id...) But on contact events, there is no message id in the payload.

Affected :

  • Contact deleted
  • Contact updated
  • Contact added to list

contact updated payload exemple (source):

{
  "id": xxxxxx,
  "email": "example@domain.com",
  "event": "contact_updated",
  "key": "xxxxxxxxxxxxxxxxxx",
  "content": [
    {
    "name": "John",
    "lastname" : "Doe",
    "work_phone": "+506 2220 2307"
    }
  ],
  "date": "2020-10-09 00:00:00",
  "ts": 1604937111
}

Code from BrevoRequestParser

if (
      !isset($content['event'])
      || !isset($content['email'])
      || !isset($content['message-id'])
      || !isset($content['ts_event'])
  ) {
      throw new RejectWebhookException(406, 'Payload is malformed.');
  }

How to reproduce

trigger contact events from brevo

Possible Solution

check keys based on "event"

Additional Context

No response

@julienbornstein
Copy link
Author

ok, forget it, the whole library doesn't supports Contact Event types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants