Get your API Key
Create an account on the Peekalink website and grab your private API Key from your dashboard.
In a nutshell
- You want to preview the link
- Your frontend sends the link to preview
https://bit.ly/3frD2OPto an endpoint on your backend like
- Your backend sends the link to preview
https://bit.ly/3frD2OPtogether with your private API Key on a header
X-API-Key=YourSecretKeyto the Peekalink endpoint
- The Peekalink endpoint returns the preview for the link in
JSONformat and your backend forwards the data to your frontend.
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.
Up next, Peekalink consists of 2 different endpoints, continue onto the Preview endpoint section.