Reputation: 588
I am trying to get the list of folders under a workspace in Smart Sheet. I did a GET call to the url : https://api.smartsheet.com/workspace/{WORKSPACE_ID}/folders. I am using the Access Token of a user who is the owner of the sheet. I am getting this error from Smartsheet server :
You don't have permission to access /1.1workspace/{WORKSPACE_ID}/folders on this server.
what could be the problem?
Upvotes: 1
Views: 628
Reputation: 13500
This error message indicates that the user making the request is not "shared" to the Workspace specified in the Request. To troubleshoot this issue, I'd suggest that you do the following:
Verify that the token you're including in the Request is valid and does indeed correspond to a user that has access to the Workspace in Smartsheet. If feasible, you could verify the users access easily by logging into Smartsheet (via the web UI), navigating to the Workspace, and verifying that the User is listed in the "Workspace Shared To" panel on the right side of the screen.
Verify that the Workspace ID that you're including in the Request URL is correct -- i.e., that it does indeed correspond to the Workspace that the requesting User has access to.
As long as the token that you're including in the Request header corresponds to a User that has access to (i.e., is Shared to) the specified Workspace (represented by Workspace Id), the "Get Workspace Folders" request should be successful.
Upvotes: 2