Mastodon
  • What is Mastodon?
  • Using Mastodon
    • Signing up for an account
    • Setting up your profile
    • Posting to your profile
    • Using the network features
    • Dealing with unwanted content
    • Promoting yourself and others
    • Set your preferences
    • More settings
    • Using Mastodon externally
    • Moving or leaving accounts
    • Running your own server
  • Running Mastodon
    • Preparing your machine
    • Installing from source
    • Configuring your environment
    • Installing optional features
      • Full-text search
      • Hidden services
      • Single Sign On
    • Setting up your new instance
    • Using the admin CLI
    • Upgrading to a new release
    • Backing up your server
    • Migrating to a new machine
    • Scaling up your server
    • Moderation actions
    • Troubleshooting errors
      • Database index corruption
  • Developing Mastodon apps
    • Getting started with the API
    • Playing with public data
    • Obtaining client app access
    • Logging in with an account
    • Libraries and implementations
  • Contributing to Mastodon
    • Technical overview
    • Setting up a dev environment
    • Code structure
    • Routes
    • Bug bounties and responsible disclosure
  • Spec compliance
    • ActivityPub
    • WebFinger
    • Security
    • Microformats
    • OAuth
    • Bearcaps
  • REST API
    • Guidelines and best practices
    • OAuth Scopes
    • Rate limits
  • API Methods
    • apps
      • oauth
      • emails
    • accounts
      • bookmarks
      • favourites
      • mutes
      • blocks
      • domain_blocks
      • filters
      • reports
      • follow_requests
      • endorsements
      • featured_tags
      • preferences
      • followed_tags
      • suggestions
      • tags
    • statuses
      • media
      • polls
      • scheduled_statuses
    • timelines
      • conversations
      • lists
      • markers
      • streaming
    • notifications
      • push
    • search
    • instance
      • trends
      • directory
      • custom_emojis
      • announcements
    • admin
      • admin/accounts
      • admin/domain_blocks
      • admin/reports
      • admin/trends
      • canonical_email_blocks
      • dimensions
      • domain_allows
      • email_domain_blocks
      • ip_blocks
      • measures
      • retention
    • proofs
    • oembed
  • API Entities
    • Account
    • Admin::Account
    • Admin::CanonicalEmailBlock
    • Admin::Cohort
    • Admin::Dimension
    • Admin::DomainAllow
    • Admin::DomainBlock
    • Admin::EmailDomainBlock
    • Admin::Ip
    • Admin::IpBlock
    • Admin::Measure
    • Admin::Report
    • Announcement
    • Application
    • Context
    • Conversation
    • CustomEmoji
    • DomainBlock
    • Error
    • ExtendedDescription
    • FamiliarFollowers
    • FeaturedTag
    • Filter
    • FilterKeyword
    • FilterResult
    • FilterStatus
    • IdentityProof
    • Instance
    • List
    • Marker
    • MediaAttachment
    • Notification
    • Poll
    • Preferences
    • PreviewCard
    • Reaction
    • Relationship
    • Report
    • Role
    • Rule
    • ScheduledStatus
    • Search
    • Status
    • StatusEdit
    • StatusSource
    • Suggestion
    • Tag
    • Token
    • V1::Filter
    • V1::Instance
    • WebPushSubscription

OAuth Scopes

Defining what you have permission to do with the API

    • OAuth Scopes
      • Version history
    • List of scopes
      • read
      • write
      • follow
      • push
      • Admin scopes
    • Granular scopes

OAuth Scopes

The API is divided up into access scopes. The scopes are hierarchical, i.e. if you have access to read, you automatically have access to read:accounts. It is recommended that you request as little as possible for your application.

Multiple scopes can be requested at the same time: During app creation with the scopes param, and during the authorization phase with the scope query param (space-separate the scopes).

Mind the scope vs scopes difference. This is because scope is a standard OAuth parameter name, so it is used in the OAuth methods. Mastodon鈥檚 own REST API uses the more appropriate scopes.

If you do not specify a scope in your authorization request, or a scopes in your app creation request, the resulting access token / app will default to read access.

The set of scopes saved during app creation must include all the scopes that you will request in the authorization request, otherwise authorization will fail.

Version history

  • 0.9.0 - read, write, follow
  • 2.4.0 - push
  • 2.4.3 - granular scopes #7929
  • 2.6.0 - read:reports deprecated (unused stub) #8736/adcf23f
  • 2.6.0 - write:conversations added #9009
  • 2.9.1 - Admin scopes added #9387
  • 3.1.0 - Bookmark scopes added #7107
  • 4.1.0 - Added admin scopes for blocks and allows #20918

List of scopes

read

Grants access to read data. Requesting read will also grant child scopes shown in the left column of the table below.

  • read
    • read:accounts
    • read:blocks
    • read:bookmarks
    • read:favourites
    • read:filters
    • read:follows
    • read:lists
    • read:mutes
    • read:notifications
    • read:search
    • read:statuses

write

Grants access to write data. Requesting write will also grant child scopes shown in the right column of the table below.

  • write
    • write:accounts
    • write:blocks
    • write:bookmarks
    • write:conversations
    • write:favourites
    • write:filters
    • write:follows
    • write:lists
    • write:media
    • write:mutes
    • write:notifications
    • write:reports
    • write:statuses

follow

Deprecated
This scope has been deprecated in 3.5.0 and newer. You should instead request the child scopes individually, or request read/write permission as needed.

Grants access to manage relationships. Requesting follow will also grant the following child scopes, shown in bold in the table:

  • read:blocks, write:blocks
  • read:follows, write:follows
  • read:mutes, write:mutes

push

Grants access to Web Push API subscriptions. Added in Mastodon 2.4.0.

Admin scopes

Used for moderation API. Added in Mastodon 2.9.1. The following granular scopes are available (note that there is no singular admin scope):

  • admin:read
    • admin:read:accounts
    • admin:read:reports
    • admin:read:domain_allows
    • admin:read:domain_blocks
    • admin:read:ip_blocks
    • admin:read:email_domain_blocks
    • admin:read:canonical_email_blocks
  • admin:write
    • admin:write:accounts
    • admin:write:reports
    • admin:write:domain_allows
    • admin:write:domain_blocks
    • admin:write:ip_blocks
    • admin:write:email_domain_blocks
    • admin:write:canonical_email_blocks

Granular scopes

readwrite
read:accountswrite:accounts
read:blockswrite:blocks
read:bookmarkswrite:bookmarks
write:conversations
read:favouriteswrite:favourites
read:filterswrite:filters
read:followswrite:follows
read:listswrite:lists
write:media
read:muteswrite:mutes
read:notificationswrite:notifications
write:reports
read:search
read:statuseswrite:statuses
admin:readadmin:write
admin:read:accountsadmin:write:accounts
admin:read:reportsadmin:write:reports
admin:read:domain_allowsadmin:write:domain_allows
admin:read:domain_blocksadmin:write:domain_blocks
admin:read:ip_blocksadmin:write:ip_blocks
admin:read:email_domain_blocksadmin:write:email_domain_blocks
admin:read:canonical_email_blocksadmin:write:canonical_email_blocks

Last updated December 14, 2022 路 Improve this page

Sponsored by

Dotcom-Monitor LoadView Stephen Tures Swayable SponsorMotion

Join Mastodon 路 Blog 路 路

View source 路 CC BY-SA 4.0 路 Imprint