Firebase target users based on the imported segments

1k Views Asked by At

I would like to send in-app and cloud messages to a group of users based on non-standard criteria. I decided to link firebase project with BigQuery and use imported segments to accomplish this task. The problem is that fcm message composer always target 0 users when i filter users based on the segment.

I added such entry to the SegmentMetadata table

{
    "segment_label": "test_segment_label",
    "display_name": "test_display_name_metadata"
  }

and such entry to the SegmentMemberships table

{
    "instance_id": my device fcm token,
    "segment_labels": [
      "test_segment_label"
    ],
    "update_time": null,
    "membership_name": "test"
  }

Now on the firebase console when i am trying to send cloud message and target users based on this segment i see that 0 users are matched, do you have any idea why? image snapshot from firebase console

(my device fcm token that i putted on the entry in the SegmentMemberships table should be valid because i see on android studio logs that it doesn't change)

1

There are 1 best solutions below

1
On BEST ANSWER

instance_id is not your fcm token but the part before colon in your token. When you call getToken() in SDK the token returned is in this format: <instance_id>:<token>