INCOMPLETE_PROFILE_DATA when routing to courier push

Trying to send a push notification via courier. When I look at the logs, for the routing step, I get INCOMPLETE_PROFILE_DATA. I wasn’t able to find required fields for this provider. My user only has user ID and email right now, but I’m not sure what I would need to add.

{
  "details": {
    "channelSummary": [
      {
        "channel": "email",
        "provider": "sendgrid",
        "selected": true,
        "condition": {
          "filters": [],
          "logicalOperator": "and",
          "behavior": "hide"
        }
      },
      {
        "channel": "push",
        "provider": "courier",
        "selected": false,
        "reason": "INCOMPLETE_PROFILE_DATA"
      }
    ],
    "preferences": {
      "categories": null,
      "notifications": null
    }
  }
}

Thanks for any help you can provide!

Hey @jacob,

In order to successfully send a Courier Push notification, your profile needs to include a user_id. What does your request currently look like?

Thanks!

Sure. Here’s my request.

{
  "message": {
    "to": {
      "user_id": "38e48d03-0dbe-48a6-b85c-557f2c5a31de"
    },
    "template": "DKVEE2E8WG48CNM2ACJ49XP7DGYX",
    "data": {
      (redacted)
    }
  }
}

Here’s what the user profile looks like for that user:

Anything more you all need from me? Not sure what I’m missing here in my request.

Hey @jacob,

It looks like you’ve been able to successfully send some Courier Push notifications to your web frontend. From looking at your logs for ‘Push Test’ your request included a to.user_id and to.courier.channel with the recipient_id - these are required for your push notification to send.

Does the user_id prop you pass in your CourierProvider component match the one in your request?

Thanks, I was able to solve this by including the courier.channel field on the user’s profile. I thought that maybe having the user ID specified in the to section would be enough, but you need this as well.

Send Push Notifications Using Courier Push | Courier Docs says that this is necessary, but POST /send | Courier Docs doesn’t which added to my confusion a bit, I suppose.

Either way, thanks for your help! Would not have figured it out without you.

1 Like

Always a pleasure @jacob!