CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/account/settings/api-keys.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { FormattedMessage, useIntl } from "react-intl";
7
8
import ApiKeysTables from "@cocalc/frontend/components/api-keys";
9
import { webapp_client } from "@cocalc/frontend/webapp-client";
10
import { Paragraph, SettingBox } from "@cocalc/frontend/components";
11
12
const manage = (opts) => webapp_client.account_client.api_keys(opts);
13
14
export default function ApiKeys() {
15
const intl = useIntl();
16
17
const title = intl.formatMessage({
18
id: "account.settings.api-keys.title",
19
defaultMessage: "API Keys",
20
});
21
22
return (
23
<SettingBox title={title} icon={"api"}>
24
<ApiKeysTables manage={manage} />
25
<Paragraph>
26
<FormattedMessage
27
id="account.settings.api-keys.explanation"
28
defaultMessage={`You can also make project specific api keys in any project's settings.
29
If you only need to use the API to access one project, these are safer.`}
30
/>
31
</Paragraph>
32
</SettingBox>
33
);
34
}
35
36