Skip to content

Anyone figured out the push notifications? #12

@michaelmaston

Description

@michaelmaston

First off, thanks so much for all involved that have contributed to this info. Super useful!!!

Anyone figure out how to use the following URL for Flo? I captured some calls to it with Charles on my iPhone.

https://api-gw.meetflo.com/api/v1/pushnotificationtokens/ios

It looks to me like a way to get change notifications pushed to you vs. polling for changes. I assume it's using some separate channel, perhaps a TCP connection so I don't see anything in my captures after this gets called pretty early in the app's startup. The outbound JSON looks like this:

{
"aws_endpoint_id": "id string for AWS I assume",
"mobile_device_id": "id string for the device",
"token":"token string different than auth token"
}

and what comes back in the response is this:

{
"mobile_device_id": "same device id string as above",
"aws_endpoint_id": "same AWS id string as above",
"client_id": "client id of some sort",
"user_id": "my user id",
"token": "same token as above",
"client_type": 1,
"mobile_device_id_client_id": "mobile_device_id in this message" + ":" + "client_id in this message",
"created_at": "2021-08-02T20:36:14.120Z",
"updated_at": "2021-08-02T20:36:14.120Z"
}

I took out the actual data where it was helpful to point out where the same values show up. I haven't tried repeating this capture yet to see if anything changes from run to run. Without knowing where to go next it doesn't help but hoping someone out there has dug deeper into this.

I'm assuming you need to use the response info, particularly the mobile and client ids to log in somewhere else to get the push notifications.

Separate question: Is there a recommendation on how often to poll the server for updates, both from the perspective of what is reasonable given how slow/fast things change and keeping Moen from getting irritated by me using there server? Having the push notifications would eliminate that issue but until it is actually working, I have to poll.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions