Content Viewer API to get an Edit URL

  • 2
  • Question
  • Updated 3 weeks ago
Hi,

We need to be able to simply generate a URL for the Word Online 'Edit' version of an Item, so that we can generate an 'edit' link inside our own web ui.

From what I understand the Content Viewer API has not been implemented, so i've been trying to reverse engineer the ContentViewer endpoints from the sharefile web UI, but i'm a bit stuck, so hoping someone could help me.

The endpoint it calls is:
POST https://xxx.sf-api.com/sf/v3/Items/ContentViewer
Payload: {
  ItemUrl: "https://xxx.sf-api.com/sf/v3/Items(fidb7ea9-49dc-c7a5-0b16-daa419622b12)",
  Action: "Edit"
}

This returns a Redirection object with:
 Url: "https://sf-cv.sharefile.com/service/contentviewer/View"
 Body: { Token: "eyJhbGciOiJkaXIi....." }
 Method: "POST"

I then try to use the token in the Edit URL (like so), but with no luck.
https://sf-cv.sharefile.com/service/contentviewer/launch?ItemUrl=...&ItemAction=Edit&DisableClose=False&ShowClose=False&ShowInterface=False&r= eyJhbGciOiJkaXIi ...

Am I missing a step here? Is it even possible to get an Edit URL from the API?

Cheers, Ben

Photo of Ben Southall

Ben Southall

  • 6 Posts
  • 1 Reply Like

Posted 3 weeks ago

  • 2
Photo of Sagar Thirumala

Sagar Thirumala, Employee

  • 3 Posts
  • 0 Reply Likes
Hi Ben,

There are no public ShareFile APIs for Word Online editing.

Thanks!
Sagar