LEE
LEE

Reputation: 3605

Get embed URL through onedrive API

Is there a way to get the embed URL through onedrive's API.

An embed URL is a publicly accessible URL that does not require a login since it contains an authkey.

I did manage to get the cid and resid, however, I can't figure out how to get authkey. Is there any way to get it? I'm currently on onedrive's python SDK.

Upvotes: 0

Views: 2206

Answers (1)

Brad
Brad

Reputation: 4202

You should be able to use the createLink API to request an embed link.

POST /me/drive/items/{item-id}/createLink
Content-Type: application/json

{
  "type": "embed"
}

See this documentation for full details.

The SDK should also have createLink exposed so the above should map relatively easily into your use-case.

Upvotes: 2

Related Questions