Setup

Get your API Key

Create an account on the Peekalink website and grab your private API Key from your dashboard.

In a nutshell

  1. You want to preview the link https://bit.ly/3frD2OP
  2. Your frontend sends the link to preview https://bit.ly/3frD2OP to an endpoint on your backend like https://yourbackend.com/peekalink.
  3. Your backend sends the link to preview https://bit.ly/3frD2OP together with your private API Key on a header X-API-Key=YourSecretKey to the Peekalink endpoint https://api.peekalink.io/
  4. The Peekalink endpoint returns the preview for the link in JSON format and your backend forwards the data to your frontend.

Important note

The frontend does not call the API directly.

The frontend should call your own backend with the link to preview, your backend should then sends a request to Peekalink with your private API Key and the link to preview.

If the API key is accessible to your users, they can potentially steal it and use the service on your behalf elsewhere.

Apart from this, if you are going the extra mile on privacy-integration and will implement a reverse proxy to load our optimised images, making the requests directy would render all of that useless too.

Next steps

Up next, Peekalink consists of 2 different endpoints, continue onto the Preview endpoint section.