1 import { Note, InlineIcon } from "docs-ui"
2 import { EllipsisHorizontal } from "@medusajs/icons"
3
4 export const metadata = {
5 title: `Access Keys`,
6 }
7
8 # {metadata.title}
9
10 In this guide, you'll learn how to create and manage access keys to authenticate with Cloud APIs.
11
12 ## What are Access Keys?
13
14 Access keys are API credentials that allow you to authenticate with Cloud services programmatically. They provide secure access to your Cloud resources without requiring interactive login.
15
16 Access keys are useful when using the [Cloud CLI](../cli/page.mdx) in non-interactive environments such as CI/CD pipelines, server scripts, or when you want to avoid opening a browser for authentication.
17
18 Cloud supports two types of access keys:
19
20 - **Organization Access Keys**: Provide access to organization-level resources and settings.
21 - **Personal Access Keys**: Provide access to your personal account resources and any organizations you belong to.
22
23 ---
24
25 ## Manage Organization Access Keys
26
27 Organization access keys allow API access to organization-level resources such as projects, environments, and billing information. These keys can be managed by any organization member.
28
29 To manage organization access keys:
30
31 1. If you're in a different organization, [switch to the organization](../organizations/page.mdx#switch-organization).
32 2. Make sure you're on the projects overview page of the organization. You can do this by clicking on the organization name at the top left of the dashboard.
33 3. Click on **Access keys** > **Organization** in the sidebar.
34
35 From this page, you can view all organization access keys, including their names, redacted key previews, and creation dates.
36
37 ### Create Organization Access Key
38
39 To create a new organization access key:
40
41 1. In the Organization Access Keys page, click **Create Access Key**.
42 2. In the modal that appears, enter a **Name** for your access key. Choose a descriptive name that helps you identify the key's purpose.
43 3. Click **Create**.
44
45 After creation, the full access key token will be displayed with a copy button. Make sure to copy and store this token before closing the modal, as it won't be shown again.
46
47 ### Rename Organization Access Key
48
49 To rename an existing organization access key:
50
51 1. In the Organization Access Keys table, find the key you want to rename.
52 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three dots" /> button in the key's row.
53 3. Select **Rename** from the dropdown menu.
54 4. Enter the new name and click **Save**.
55
56 ### Delete Organization Access Key
57
58 <Note type="warning">
59
60 Deleting an access key will immediately revoke API access for any applications or scripts using that key. This action cannot be undone.
61
62 </Note>
63
64 To delete an organization access key:
65
66 1. In the Organization Access Keys table, find the key you want to delete.
67 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three dots" /> button in the key's row.
68 3. Select **Delete** from the dropdown menu.
69 4. Confirm the deletion in the popup.
70
71 ---
72
73 ## Manage Personal Access Keys
74
75 Personal access keys provide API access to your individual account resources and all organizations you have access to. These keys are private to your account and can only be managed by you.
76
77 To access your personal access keys:
78
79 1. If you're in a different organization, [switch to the organization](../organizations/page.mdx#switch-organization).
80 2. Make sure you're on the projects overview page of the organization. You can do this by clicking on the organization name at the top left of the dashboard.
81 3. Click on **Access keys** > **Personal** in the sidebar.
82
83 From this page, you can view all your personal access keys, including their names, redacted key previews, and creation dates.
84
85 ### Create Personal Access Key
86
87 To create a new personal access key:
88
89 1. In the Personal Access Keys page, click **Create Access Key**.
90 2. In the modal that appears, enter a **Name** for your access key. Choose a descriptive name that helps you identify the key's purpose.
91 3. Click **Create**.
92
93 After creation, the full access key token will be displayed with a copy button. Make sure to copy and store this token before closing the modal, as it won't be shown again.
94
95 ### Rename Personal Access Key
96
97 To rename an existing personal access key:
98
99 1. In the Personal Access Keys table, find the key you want to rename.
100 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three dots" /> button in the key's row.
101 3. Select **Rename** from the dropdown menu.
102 4. Enter the new name and click **Save**.
103
104 ### Delete Personal Access Key
105
106 <Note type="warning">
107
108 Deleting an access key will immediately revoke API access for any applications or scripts using that key. This action cannot be undone.
109
110 </Note>
111
112 To delete a personal access key:
113
114 1. In the Personal Access Keys table, find the key you want to delete.
115 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three dots" /> button in the key's row.
116 3. Select **Delete** from the dropdown menu.
117 4. Confirm the deletion in the confirmation dialog.