1

With PHP, I create a smartsheet from excel file with smartsheet API. Everything is working fine so far. But I also want to give right access to the new smartsheet to a specific user to allow him to open it from a browser.

The user already has a smartsheet account.

Is there a smartsheet endpoint that allows this to be done?

Thank you

1 Answers1

2

The operation you're looking for is Share Sheet.

The following example request grants the Smartsheet user who's registered with email address jane.doe@test.com EDITOR (write) access to the sheet that's specified by sheetId in the request URL.

POST /sheets/{sheetId}/shares
[
  {
    "email": "jane.doe@test.com", 
    "accessLevel": "EDITOR"
  }
]

A couple of notes:

  • By default, the Share Sheet operation won't send an email to the user to notify them that they've been granted access to the sheet. If you want it to send them an email, you'll need to specify the query string parameter/value sendEmail=true on the request URL, and specify the message and subject properties in the body of the request. See Share Sheet in the API docs for details about this.

  • If you want the user to be able to share the sheet with others, you'll want to specify EDITOR_SHARE as the access level (instead of EDITOR). See Access Levels in the API docs for details about the various permissions.

Kim Brandl
  • 13,125
  • 2
  • 16
  • 21