Creating a getDestinations function
In your frontend, call the
useGetDestinationsForRecipient hook to generate a function that fetches a scoped auth token and uses it to get destinations for the recipient scoped by the token. Use one of the fetchToken functions you wrote in Building an “Add Destination” connection form here to create one.Create getDestinations
Using getDestinations
Use
getDestinations created in Step 1 to fetch destinations for the given recipient.Fetch destinations