[API] How to create a board with sharing access set to owner_and_coowners?

  • 20 July 2022
  • 7 replies
  • 109 views

Badge

Hi,

As the question already said, I want to create a board with sharingAccess set to owner_and_coowners. However, as the following request’s response shows, it failed.

Request
POST https://api.miro.com/v2/boards

{
"name": "Name of board",
"policy": {
"permissionsPolicy": {
"collaborationToolsStartAccess": "all_editors",
"copyAccess": "board_owner",
"sharingAccess": "owner_and_coowners"
},
"sharingPolicy": {
"access": "edit",
"inviteToAccountAndBoardLinkAccess": "no_access",
"organizationAccess": "private",
"teamAccess": "edit"
}
},
"description": "Some Description",
"teamId": "{{teamId}}"
}

Response

{
"type": "error",
"code": "4.0105",
"message": "Some features are missing to set the board policies provided. Please check your account settings.",
"status": 403
}

The response above says that some features are missing to set board policies and to check my account settings. However, I couldn’t find any account settings that could probably affect this.


7 replies

Userlevel 2
Badge

Hey @Kapildev Neupane! I’m hopeful this is an easy fix, as I believe there is a typo in your code:

 

"sharingAccess": "owner_and_coowners"

needs to be

"sharingAccess": "board_owners_and_coowners"

 

Specifically, your code sample is missing the `board_` at the beginning and the plural `s` from `owners`.

 

Let me know if this fixes the issue! 

-Joanna

Badge

Hi @Joanna Smith ! I took the value from this API document: https://developers.miro.com/reference/create-board

As you can see in that document, it can either accept owner_and_coowners or team_members_with_editing_rights. If what you say is true, then that document also needs updating.

I tried with what you suggested, but it returned with the following error:

 

{
"type": "error",
"code": "2.0703",
"context": {
"fields": [
{
"field": "policy.permissionsPolicy.sharingAccess",
"message": "Unexpected value [board_owners_and_coowners], expected one of: [TEAM_MEMBERS_WITH_EDITING_RIGHTS, OWNER_AND_COOWNERS]"
}
]
},
"message": "Invalid parameters",
"status": 400
}

 

Userlevel 2
Badge

Yikes, you’re right. This was my bad. I didn’t realize that the accepted values were worded differently for different fields. 🤦‍♀️ I apologize.

Could you let me know what team the app is installed on? Is it a developer team, or a regular account team? If it’s a regular account team, can you let me know what license (if any) the team has? i.e. Enterprise, Consultant, Free, etc.

 

-Joanna

Badge

It was installed on a Developer Team. When I installed it for a regular account team with a License, I was able to install it successfully.

If you reply that it can only be installed on a regular account team with a License, is there anyway to check beforehand if the user is a Licensed one when they install the OAuth app? 

Userlevel 2
Badge

Hmm, that shouldn’t be an issue. Developer Teams are meant to be used when developing and testing an app. My question was trying to figure out where to look, if there was perhaps a company admin setting.

 

Let me try to reproduce this error, and I’ll reply again based on what I find.

-Joanna

Badge

Please let me know when new information comes up

Badge +1

Has this been reproduced? Is a resolution available? I’m also getting this error when copying a board from a Developer Team account or a regular account.

Reply