Is it possible to get a permenant public link from onedrive API ? If yes then How?

415 Views Asked by At

I am using the onedrive api. By using the API I am getting the pre-signed public link which will expired after my token validity will expired. Which is generally 1hr validity(So public link is not working after 1hr).

So Is there any way to generate a permanent public link with onedrive REST API?

Referencelink

1

There are 1 best solutions below

0
On

Yes there is a way to generate permanent links to items in OneDrive. action.createLink lets you create view and edit links to items in OneDrive, anyone with these links can view or edit the item.

Here is what the action.createLink request could look like for your application:

POST /drive/items/{item-id}/action.createLink Content-Type: application/json { "type": "view" }