OAuth Actor Authorization

By default all Linear's API authentication methods treat the authenticating user as the API actor. Most of the time this is fine and each user has to authorize their own access.

Linear also supports OAuth Actor Authorization which allows performing certain API actions as the application instead of the user authorizing the application. To enable the actor authorization, add actor=application parameter to your OAuth authorization URL. The setting is tied to the authorization and its access token. In this mode, all created issues, comments and linked attachments will be created as the application.

In addition to creating resources as applications, you can also add an optional user name and avatar to go with the application to have it rendered in User (via Application) format. This will help identify the user that performed the action in the 3rd party system.

To set the custom user name, set the createAsUser attribute with the user name and set displayIconUrl with the URL of the avatar in issueCreate or commentCreate mutations:

mutation IssueCreate {
  issueCreate(
    input: {
      title: "New exception"
      description: "More detailed error report in markdown"
      teamId: "9cfb482a-81e3-4154-b5b9-2c805e70a02d"
      createAsUser: "Mark"
      displayIconUrl: "http://path.to/image.png"
    }
  ) {
    success
    issue {
      id
      title
    }
  }
}

Last updated