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 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 createAsUser attribute with the user name in issueCreate or commentCreate mutations:
1
mutation IssueCreate {
2
issueCreate(
3
input: {
4
title: "New exception"
5
description: "More detailed error report in markdown"
6
teamId: "9cfb482a-81e3-4154-b5b9-2c805e70a02d"
7
createAsUser: "Mark"
8
}
9
) {
10
success
11
issue {
12
id
13
title
14
}
15
}
16
}
Copied!
Copy link