Skip to content

Commit 2b7738a

Browse files
committed
Merge branch 'main' into v3/machine-config
2 parents 9354443 + f1c768a commit 2b7738a

File tree

8 files changed

+27
-8
lines changed

8 files changed

+27
-8
lines changed

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ function V3ProjectSideMenu({
556556
data-action="test"
557557
/>
558558
<SideMenuItem
559-
name="API Keys"
559+
name="API keys"
560560
icon={KeyIcon}
561561
iconColor="text-amber-500"
562562
to={v3ApiKeysPath(organization, project)}

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
TableHeaderCell,
2020
TableRow,
2121
} from "~/components/primitives/Table";
22+
import { TextLink } from "~/components/primitives/TextLink";
2223
import { useProject } from "~/hooks/useProject";
2324
import { ApiKeysPresenter } from "~/presenters/v3/ApiKeysPresenter.server";
2425
import { requireUserId } from "~/services/session.server";
@@ -55,22 +56,23 @@ export default function Page() {
5556
return (
5657
<PageContainer>
5758
<NavBar>
58-
<PageTitle title="API Keys" />
59+
<PageTitle title="API keys" />
5960
<PageAccessories>
6061
<LinkButton
6162
variant={"minimal/small"}
6263
LeadingIcon={BookOpenIcon}
63-
to={docsPath("/documentation/concepts/environments-endpoints#environments")}
64+
to={docsPath("/v3/apikeys")}
6465
>
6566
API keys docs
6667
</LinkButton>
6768
</PageAccessories>
6869
</NavBar>
6970
<PageBody>
7071
<div className={cn("h-full")}>
71-
<Header3 spacing>Server API keys</Header3>
72+
<Header3 spacing>Secret keys</Header3>
7273
<Paragraph variant="small" spacing>
73-
Server API keys should be used on your server – they give full API access.
74+
Secret keys should be used on your server – they give full API access and allow you to{" "}
75+
<TextLink to={docsPath("v3/triggering")}>trigger tasks</TextLink> from your backend.
7476
</Paragraph>
7577
<Header3 spacing>Public API keys</Header3>
7678
<Paragraph variant="small" spacing>
@@ -81,7 +83,7 @@ export default function Page() {
8183
<TableHeader>
8284
<TableRow>
8385
<TableHeaderCell>Environment</TableHeaderCell>
84-
<TableHeaderCell>Server API key</TableHeaderCell>
86+
<TableHeaderCell>Secret key</TableHeaderCell>
8587
<TableHeaderCell>Public API key</TableHeaderCell>
8688
<TableHeaderCell>Keys generated</TableHeaderCell>
8789
<TableHeaderCell>Latest version</TableHeaderCell>

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default function Page() {
167167
<PageAccessories>
168168
<LinkButton
169169
LeadingIcon={BookOpenIcon}
170-
to={docsPath("/documentation/concepts/environments-endpoints#environments")}
170+
to={docsPath("v3/deploy-environment-variables")}
171171
variant="minimal/small"
172172
>
173173
Environment variables docs

docs/images/v3/api-keys.png

102 KB
Loading

docs/mint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@
452452
"v3/trigger-folder",
453453
"v3/tasks-overview",
454454
"v3/triggering",
455+
"v3/apikeys",
455456
{
456457
"group": "Task types",
457458
"pages": ["v3/tasks-regular", "v3/tasks-scheduled", "v3/tasks-zod", "v3/tasks-webhooks"]

docs/v3/apikeys.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "API keys"
3+
description: "How to authenticate with Trigger.dev so you can trigger tasks."
4+
---
5+
6+
### Authentication and your secret keys
7+
8+
When you [trigger a task](/v3/triggering) from your backend code, you need to set the `TRIGGER_SECRET_KEY` environment variable.
9+
10+
Each environment has its own secret key. You can find the value on the API keys page in the Trigger.dev dashboard:
11+
12+
![How to find your secret key](/images/v3/api-keys.png)

docs/v3/deploy-environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We deploy your tasks and scale them up and down when they are triggered. So any
1818

1919
<Step title="Add your environment variables">
2020
You can add values for your local dev environment, staging and prod. ![Environment variables
21-
page](/images/v3/environment-variables-page.jpg){" "}
21+
page](/images/v3/environment-variables-panel.jpg)
2222
</Step>
2323

2424
</Steps>

docs/v3/triggering.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ You can trigger any task from your backend code, using either `trigger()` or `ba
2323
Trigger.dev API key to the world.
2424
</Note>
2525

26+
### Authentication
27+
28+
When you trigger a task from your backend code, you need to set the `TRIGGER_SECRET_KEY` environment variable. You can find the value on the API keys page in the Trigger.dev dashboard. [More info on API keys](/v3/apikeys).
29+
2630
### trigger()
2731

2832
Triggers a single run of a task with the payload you pass in, and any options you specify. It does NOT wait for the result, you cannot do that from outside a task.

0 commit comments

Comments
 (0)