How to get the invite code that some one shared to me directly not in a card/group by rest API

519 Views Asked by At

I can get friend shared locations in a card/group by retrieving the invite code from the card detail.

But if a friend shared his location directly to me not in a card/group. As I understood, in this situation the invite code is send by SMS, email, push notification etc. Is it possible to get the invite code with rest API? Can HTTP push do this?

1

There are 1 best solutions below

0
On BEST ANSWER

When an invite code is sent via sms or email, the recipient is not necessarily a Glympse user since they can open the link in a web browser. In that case, the invite code really only lives in the link itself and there is no way to query for "invite codes sent to my email". This is an important limitation because it would be too simple for a 3rd party to query for things they shouldn't have access to if this were possible.

Similarly for invite codes that are sent via push notification, the invite code is delivered to a Glympse user but it is still treated as an invite code that does not really "belong" to the recipient and there is no way to query for invite codes sent to a Glympse user. A user can query for invites that they created using GET users/self/invites. These limitations are in place so that the sender is in control of their invites rather than recipients.

So, when you receive an invite code you should store it and treat it like it's your token to pull information about that share.

Using the invite code you can query GET invites/:code to pull information related to that invite code. https://developer.glympse.com/docs/core/api/reference/invites/code/get