Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
api key modifications (#847)
Browse files Browse the repository at this point in the history
* modify API Key flow

* move api keys lower in sidebar

* icon
  • Loading branch information
ciaranightingale authored Sep 8, 2023
1 parent 7e92ff9 commit 07a7055
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 47 deletions.
2 changes: 1 addition & 1 deletion docs/go/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ go get github.com/thirdweb-dev/go-sdk/v2/thirdweb

## Getting Started

To start using this SDK, you just need to pass in a provider configuration. It's also strongly recommended that you use your thirdweb API keys with the SDK in order to get the best infrastructure performance (across RPCs, IPFS, etc.) - you can learn more about creating and using API keys [here](https://portal.thirdweb.com/api-keys).
To start using this SDK, you just need to pass in a provider configuration. It's also recommended that you use your thirdweb API keys with the SDK in order to get the best infrastructure performance (across RPCs, IPFS, etc.) - you can learn more about creating and using API keys [here](https://portal.thirdweb.com/api-keys).

### Instantiating the SDK

Expand Down
17 changes: 0 additions & 17 deletions docs/onboarding/0 1 Platform Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ import ThemedImage from "@theme/ThemedImage";
thirdweb is a comprehensive development framework that empowers you to seamlessly
build, launch, and manage web3 applications and games across any EVM-compatible blockchain.

:::info API Keys
The following thirdweb products and services now require an API key:
- [**Smart Wallet**](/glossary/smart-wallet)
- [**Storage**](/storage)
- The following [**CLI**](/cli) commands (these commands require you to login using the [login](/cli/commands/login) command):
- [**Generate**](/cli/commands/generate)
- [**Deploy**](/cli/commands/deploy)
- [**Publish**](/cli/commands/publish)
- [**Upload**](/cli/commands/upload)
- **RPCs**

Visit the thirdweb [**Dashboard**](https://thirdweb.com/create-api-key) to create an API key.

To learn more about API keys, please visit the [**API Keys**](/api-keys) **page**.
:::


## Architecture

Whether you're developing decentralized applications from scratch or enhancing existing ones,
Expand Down
4 changes: 0 additions & 4 deletions docs/onboarding/11 Storage/0 Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ ideal for storing files in a permanent, decentralized, censorship-resistant mann
Storage powers functionality in a number of our other products, such as uploading smart contract ABIs in [deploy](/deploy),
our [IPFS Renderer](/react/react.mediarenderer) UI component & [NFT metadata fetching](/react/react.usenft) capabilities in the SDK, and uploading of NFT metadata in the dashboard.

:::caution
You will require an API key to use thirdweb’s storage services. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).
:::

<OpenSourceInfo
repoName="storage"
repoUrl="https://github.com/thirdweb-dev/js/tree/main/packages/storage"
Expand Down
2 changes: 1 addition & 1 deletion docs/python/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To get started, install the thirdweb package into your Python project:
pip install thirdweb-sdk
```

:::info
:::info API Key
You will require an API key to use thirdweb’s infrastructure services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).
:::

Expand Down
8 changes: 4 additions & 4 deletions docs/react-native/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ displayed_sidebar: react-native

# Getting Started

:::info
You will require an API key to use thirdweb’s infrastructure services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).
:::

Our SDK uses a [Provider Pattern](https://flexiple.com/react/provider-pattern-with-react-context-api/); meaning any component within the `ThirdwebProvider` will have access to the SDK.

Let's take a look at a typical setup:

## API Key

You will require an API key to use thirdweb’s infrastructure services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).

## Configure the `ThirdwebProvider`

Specify the network your smart contracts are deployed to in the `activeChain` prop and wrap your application like so:
Expand Down
5 changes: 2 additions & 3 deletions docs/react-native/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Get the instance of the `ThirdwebStorage` class being used by the [`ThirdwebProv

Allows you to use the TypeScript SDK functionality of [Storage](/storage) in your React native app.

:::caution API Key
## API Key

You will require an API key to use thirdweb’s storage services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).

You can then obtain a `clientId` from the API key which you will need to pass to the [`ThirdwebProvider`](/react/react.thirdwebprovider) component:
Expand All @@ -29,8 +30,6 @@ const App = () => {

Please note that you will also need to get your app's `bundleId` and pass it in the `Allowed Bundle IDs` section when creating your API key. Check [how you can get your app's `bundleId`](https://portal.thirdweb.com/api-keys#react-native).

:::

## useStorage hook

Configurable in the [`storageInterface`](/react/react.thirdwebprovider#storageinterface-optional) prop of the [`ThirdwebProvider`](/react/react.thirdwebprovider).
Expand Down
4 changes: 2 additions & 2 deletions docs/react/ThirdwebProvider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Wrap your app in the `ThirdwebProvider` to access the SDK&rsquo;s functionality

## Usage

:::caution API Keys
To use the React SDK, you need to first obtain an API key from the [Dashboard](https://thirdweb.com/dashboard) and then copy the `clientId` to pass as a prop to the `ThirdwebPovider`.
:::info API Keys
You will require an API key to use thirdweb's infrastructure services with the SDK, you need to first obtain an API key from the [dashboard](https://thirdweb.com/dashboard) and then copy the `clientId` to pass as a prop to the `ThirdwebPovider`.
:::

If you are using one of our <a href="#default-chains">default chains</a>, provide the name of the chain as a `string` to the `activeChain` prop.
Expand Down
2 changes: 1 addition & 1 deletion docs/react/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default function Home() {

<br />

:::caution API KEYS
:::info API Key
You will require an API key to use thirdweb's infrastructure services with the SDK. If you haven't created a key yet you can do so for **free** from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).
:::

Expand Down
5 changes: 2 additions & 3 deletions docs/react/storage/usestorage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Get the instance of the `ThirdwebStorage` class being used by the [`ThirdwebProv

Allows you to use the TypeScript SDK functionality of [Storage](/storage) in your React app.

:::caution API Key
## API Key

You will require an API key to use thirdweb’s storage services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).

You can then obtain a `clientId` from the API key which you will need to pass to the [`ThirdwebProvider`](/react/react.thirdwebprovider) component:
Expand All @@ -25,8 +26,6 @@ const App = () => {
};
```

:::

Configurable in the [`storageInterface`](/react/react.thirdwebprovider#storageinterface-optional) prop of the [`ThirdwebProvider`](/react/react.thirdwebprovider).

The hook returns a [`ThirdwebStorage`](/typescript/storage) instance. View the [TypeScript Storage](/typescript/storage) documentation for more information.
Expand Down
5 changes: 2 additions & 3 deletions docs/react/storage/usestorageupload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Hook for uploading files to IPFS and retrieving the IPFS URI.
import { useStorage } from "@thirdweb-dev/react";
```

:::caution API Key
## API key

You will require an API key to use thirdweb’s storage services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).

You can then obtain a `clientId` from the API key which you will need to pass to the [`ThirdwebProvider`](/react/react.thirdwebprovider) component:
Expand All @@ -27,8 +28,6 @@ const App = () => {
};
```

:::

## Usage

```jsx
Expand Down
2 changes: 1 addition & 1 deletion docs/typescript/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npx thirdweb create app

<br />

:::info
:::info API Key
You will require an API key to use thirdweb’s infrastructure services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/unity/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import GettingStartedLiveEditor from "@components/live-code/snippets/GettingStar
Before getting started, you'll need to
[download and install the Unity Hub and Unity Editor](https://learn.unity.com/tutorial/install-the-unity-hub-and-editor).

:::info
:::info API Key
You will require an API key to use thirdweb’s infrastructure services with the SDK. If you haven’t created a key yet you can do so for free from the [**thirdweb dashboard**](https://thirdweb.com/create-api-key).
:::

Expand Down
6 changes: 2 additions & 4 deletions src/theme/DocSidebarItem/Link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const iconMapping = {
"UI Components": "/assets/product/ui.png",
Home: "/assets/icons/home.png",
"Overview ": "/assets/icons/wrench.png",
"API Keys": "/assets/icons/rocket.png",
"API Keys": "/assets/resources/key.png",
Templates: "/assets/resources/sdk-reference.svg",
Guides: "/assets/resources/guides.svg",
CLI: "/assets/product/CLI.png",
Expand Down Expand Up @@ -110,9 +110,7 @@ export default function DocSidebarItemLink({
}
${
(label === "Home" ||
label === "Overview " ||
label === "API Keys") &&
(label === "Home" || label === "Overview ") &&
styles.invertLightIcon
}
Expand Down
4 changes: 2 additions & 2 deletions src/theme/DocSidebarItems/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function DocSidebarItems({ items, ...props }) {
const sidebarItems = [
{
title: null, // No title for the first section
items: ["Home", "Overview ", "API Keys"],
items: ["Home", "Overview "],
},
{
title: "Wallets",
Expand Down Expand Up @@ -77,7 +77,7 @@ function DocSidebarItems({ items, ...props }) {
},
{
title: "Resources",
items: ["Templates", "Guides", "Glossary"],
items: ["API Keys", "Templates", "Guides", "Glossary"],
},
];

Expand Down
Binary file added static/assets/resources/key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 07a7055

@vercel
Copy link

@vercel vercel bot commented on 07a7055 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.