When you copy and share links from files, it creates a URL from which you cannot determine which file it is. For Squarl, I wanted to find out which file was behind a shared link to show the information about the file.
First of all, the shared links look like this:
|
|
First, I thought it would be a combination of splitting the URL with the site name and ID, but apparently, it was not. When I was going through the documentation, I saw the /shares/
endpoint. This endpoint seemed the one I needed to use to be able to get the file information.
Info
To use the shares
API, you need to use the share ID or the sharing URL. There is one more thing, and if you use the URL, you will need to base64 encode it.
Here is an example of how to use it with JavaScript/TypeScript.
|
|