Update changes to user id

Solved!
Posted in General by James Gentes Fri Aug 21 2015 22:19:48 GMT+0000 (UTC)·6·Viewed 780 times

You're requesting an email and 'id' for each user. If the 'id' for the user changes but the email address stays the same, is there a way to programatically update it in knowtify?
Dane Lyons
Aug 21, 2015

Yes. You can update the id through the REST api with the private API token.

The id is actually not required. As long as you don't have an id associated with a contact in Knowtify then you don't need to supply an id when initializing Inbox. The idea of the id is to add a layer of security for our users who want to send personalized messages to their contacts without it being easily intercepted. With only a public token and an email, someone could more easily make requests to our message server on behalf of our users contact and steal messages.

Normally this isn't an issue for most of our users because messages are typically things like drip or marketing messages that don't include sensitive data. So we can't allow our users to update their contact ids without supplying the old id because that would make the extra layer of security pointless. But we can allow ids to be updated if the old id is supplied. I'll add this as a todo for the javascript API.

James Gentes
Aug 21, 2015

Great, thanks for the explanation. I was thinking the id was a unique identifier in case the email changed, so if it's only a security mechanism then I could just use a hash on the email or something, in which case the id wouldn't need to change.

So don't add the to-do on my account. I'll probably start without using the id and move to it if security becomes a concern.

Philip Lee
Sep 16, 2015

Might want to change your Inbox documentation so ID isn't "REQUIRED"

Dane Lyons
Sep 16, 2015

Thanks for the suggestion Philip.


Dane Lyons marked this as solved
James Gentes
Sep 17, 2015

It looks like Inbox requires an ID for a user, otherwise it throws: "Error: Contact ID required for update request." - so is the ID really optional?

James Gentes
Sep 17, 2015

I see, it looks like the ID is optional but required if you want to update contacts, or send notifications to them. (http://api.knowtify.io/docs/javascript-widget)

Markdown is allowed