Manage teams and organizations within Miro using Miro's REST API. This app uses Node.js.
ℹ️ This example requires an Enterprise plan subscription and an Enterprise Team account.
ent_team_management_demo.mp4
-
- /GET [https://api.miro.com/v2/orgs/{org_id}/teams] i.e. List Teams API (https://developers.miro.com/reference/enterprise-get-teams)
- /GET [https://api.miro.com/v2/orgs/{org_id}/teams/{team_id}/members] i.e. List Team Members API (https://developers.miro.com/reference/enterprise-get-team-members)
- /POST [https://api.miro.com/v2/orgs/{org_id}/teams] i.e. Create Team API (https://developers.miro.com/reference/enterprise-create-team)
- /POST [https://api.miro.com/v2/orgs/{org_id}/teams/{team_id}/members] i.e. Invite Team Members API (https://developers.miro.com/reference/enterprise-invite-team-member)
- /PATCH [https://api.miro.com/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}] i.e. Update Team Members API (https://developers.miro.com/reference/enterprise-update-team-member)
- /DELETE [https://api.miro.com/v2/orgs/{org_id}/teams/{team_id}/members/{member_id}] i.e. Delete team member from team API (https://developers.miro.com/reference/enterprise-delete-team-member)
- /DELETE [https://api.miro.com/v2/orgs/{org_id}/teams/{team_id}] i.e. Delete team API (https://developers.miro.com/reference/enterprise-delete-team)
- /POST [https://api.miro.com/v2/boards] i.e. Create Board API (https://developers.miro.com/reference/create-board)
- /POST [https://api.miro.com/v2/boards/{board_id}/sticky_notes] i.e. Create Sticky Note API (https://developers.miro.com/reference/create-sticky-note-item)
- /GET [https://api.miro.com/v2/orgs/{org_id}/teams] i.e. List Teams API (https://developers.miro.com/reference/enterprise-get-teams)
- You have a Miro account.
- Your account has an Enterprise plan.
- You're signed in to Miro.
- Your Miro account has an Enterprise Developer team.
- Your development environment includes Node.js 14.13 or a later version.
- Open the project and create a
.env
file in the root directory - Inside the
.env
file, specify variableACCESS_TOKEN
and pass the value of the token generated in Step 5.⚠️ You will need to install your app under an Enterprise team in order to access Miro's Enterprise APIs.⚠️
ACCESS_TOKEN="{YOUR_ACCESS_TOKEN}"
- Run
npm install
to install dependencies. - Open the app manifest editor by clicking Edit in Manifest. \
In the app manifest editor, configure the app as follows and then click save:
# See https://developers.miro.com/docs/app-manifest on how to use this
appName: Enterprise Team Management
sdkVersion: SDK_V2
sdkUri: http://localhost:3000
scopes:
- boards:read
- boards:write
- organizations:read
- organizations:teams:write
- organizations:teams:read
- team:read
- team:write
- Go back to your app home page, and under the
Permissions
section, you will see a blue button that saysInstall app and get OAuth token
. Click that button. Then click onAdd
as shown in the video below. This will generate an access_token.
⚠️ We recommend to install your app on an Enterprise Developer Team while you are developing or testing apps for use with Enterprise endpoints.⚠️
install-drag-and-drop.mov
- Paste the value of the access_token in the variable
ACCESS_TOKEN
, in the.env
file created in Step 2. - Open the script in your code editor
- Open your terminal and run
node index.js
Your script will run using the access_token provided by your Enterprise installation in Step 5 and the terminal will output the team management details fulfilled by Miro's REST APIs.
.
├── index.js <-- NodeJS script
├── .env <-- create this when you open the script
If you want to contribute to this example, or any other Miro Open Source project, please review Miro's contributing guide.