How to share location in a group with glympse rest api

82 Views Asked by At

I am trying to share my location to a card with following steps:

  1. create a ticket with API /users/self/create_ticket
  2. set the card_id of the ticket with API /tickets/:id/append_data
  3. share ticket to a card with API /cards/:id/ticket, invite_code: random string like pUsl_79rB
  4. append location into the ticket whit API /tickets/:id/append_location

Then I retrieve card members with API /cards/:id?members=true, I can see the ticket just created and shared to the card.

But the problem is that the invite_code is always "00" like following: "ticket": {"invite_code": "00", "ticket_id": "160064993", "created_time": 1506573004818}

With invite_code "00", no one can get the location I shared.

Please help.

thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

You need to create invite code for the ticket created in step 1). So your step 1.1) would involve calling `POST tickets/:id/create_invite?type=link'. This will provide you with the code that goes to the card in step 3).