You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Linear auth provider enables tools and agents to call [Linear APIs](https://linear.app/developers/graphql) on behalf of a user.
6
6
7
+
<Callout>
8
+
Want to quickly get started with Linear in your agent or AI app? The pre-built
9
+
[Arcade Linear MCP Server](/mcp-servers/productivity/linear) is what you want!
10
+
</Callout>
11
+
7
12
### What's documented here
8
13
9
14
This page describes how to use and configure Linear auth with Arcade.
10
15
11
16
This auth provider is used by:
12
17
13
-
- Your [app code](#using-linear-auth-in-app-code) that needs to call the Linear API
14
-
- Or, your [custom tools](#using-Linear-auth-in-custom-tools) that need to call the Linear API
18
+
- The [Arcade Linear MCP Server](/mcp-servers/productivity/linear), which provides pre-built tools for interacting with Linear
19
+
- Your [app code](#using-linear-auth-in-app-code) that needs to call Linear APIs
20
+
- Or, your [custom tools](#using-linear-auth-in-custom-tools) that need to call Linear APIs
15
21
16
22
## Configuring Linear auth
17
23
@@ -25,24 +31,22 @@ This auth provider is used by:
25
31
26
32
In a production environment, you will most likely want to use your own Linear app credentials. This way, your users will see your application's name requesting permission.
27
33
28
-
29
34
Before showing how to configure your Linear app credentials, let's go through the steps to create a Linear app.
30
35
31
36
### Create a Linear app
32
37
33
-
- It is **highly recommended** to first [create a new Linear workspace](https://linear.app/join) for the purpose of managing the OAuth2 Application.
34
-
- Create a new public OAuth2 Application in your [integration's settings page](https://linear.app/settings/api/applications/new).
35
-
- Fill out your application specific information such as application name and description.
36
-
- Set the Callback URL to the redirect URL generated by Arcade (see below)
37
-
- Toggle the **Public** switch to enable public access to the application if you want other workspaces to be able to use your application.
38
-
- Once you complete creating your integration, copy the client ID and client secret to use below.
38
+
- It is **highly recommended** to first [create a new Linear workspace](https://linear.app/join) for the purpose of managing the OAuth2 Application, as each admin user will have access
39
+
- Create a new public OAuth2 Application in your [integration settings page](https://linear.app/settings/api/applications/new)
40
+
- Fill out your application specific information such as application name and description
41
+
- Choose the [scopes](https://linear.app/developers/oauth-2-0-authentication#redirect-user-access-requests-to-linear) (permissions) you need for your app
42
+
- Add the redirect URL generated by Arcade (see below) to the Callback URL field
43
+
- Toggle the **Public** switch if you want other workspaces to be able to use your application
44
+
- Copy the client ID and client secret to use below
39
45
40
46
Next, add the Linear app to Arcade.
41
47
42
48
## Configuring your own Linear Auth Provider in Arcade
43
49
44
-
45
-
46
50
<Tabsitems={["Dashboard GUI"]}>
47
51
<Tabs.Tab>
48
52
@@ -66,7 +70,7 @@ To access the Arcade Cloud dashboard, go to [api.arcade.dev/dashboard](https://a
66
70
- Choose a unique **ID** for your provider (e.g. "my-linear-provider").
67
71
- Optionally enter a **Description**.
68
72
- Enter the **Client ID** and **Client Secret** from your Linear app.
69
-
- Note the **Redirect URL** generated by Arcade. This must be set as your Linear app's Callback URL.
73
+
- Note the **Redirect URL** generated by Arcade. This must be added to your Linear app's Callback URL field.
70
74
71
75
#### Create the provider
72
76
@@ -81,27 +85,38 @@ When you use tools that require Linear auth using your Arcade account credential
81
85
82
86
## Using Linear auth in app code
83
87
84
-
Use the Linear auth provider in your own agents and AI apps to get a user token for the Linear API. See [authorizing agents with Arcade](/home/auth/how-arcade-helps) to understand how this works.
88
+
Use the Linear auth provider in your own agents and AI apps to get a user token for Linear APIs. See [authorizing agents with Arcade](/home/auth/how-arcade-helps) to understand how this works.
85
89
86
-
Use `client.auth.start()` to get a user token for the Linear API:
90
+
Use `client.auth.start()` to get a user token for Linear APIs:
@@ -155,7 +243,7 @@ If the pre-built tools in the Linear MCP Server don't meet your needs, you can a
155
243
156
244
Use the `Linear()` auth class to specify that a tool requires authorization with Linear. The `context.authorization.token` field will be automatically populated with the user's Linear token:
157
245
158
-
```python
246
+
```python {3-4,10-14,26}
159
247
from typing import Annotated, Any
160
248
161
249
from arcade_tdk import ToolContext, tool
@@ -165,14 +253,18 @@ import httpx
165
253
166
254
167
255
@tool(requires_auth=Linear(scopes=["read"]))
168
-
asyncdefget_teams(context: ToolContext) -> Annotated[dict[str, Any], "Teams in the workspace with member information"]:
256
+
asyncdefget_teams(
257
+
context: ToolContext,
258
+
) -> Annotated[dict[str, Any], "Teams in the workspace with member information"]:
169
259
"""Get Linear teams and team information including team members"""
0 commit comments