Skip to content

Commit 6bfe2f3

Browse files
Update environment variable names: VECTORIZE_TOKEN → VECTORIZE_API_KEY, VECTORIZE_ORG → VECTORIZE_ORGANIZATION_ID
- Updated API documentation and type definitions - Updated Google Drive and Dropbox guide examples - Updated all code examples to use new variable names - Ensures consistent naming across SDK documentation Co-Authored-By: [email protected] <[email protected]>
1 parent 9753a91 commit 6bfe2f3

File tree

7 files changed

+43
-43
lines changed

7 files changed

+43
-43
lines changed

docs/API.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ async function createVectorizeGDriveConnector(
351351
**Parameters:**
352352

353353
- `config`: A `VectorizeAPIConfig` object containing:
354-
- `authorization`: Bearer token for authentication (use VECTORIZE_TOKEN env var)
355-
- `organizationId`: Your Vectorize organization ID (use VECTORIZE_ORG env var)
354+
- `authorization`: Bearer token for authentication (use VECTORIZE_API_KEY env var)
355+
- `organizationId`: Your Vectorize organization ID (use VECTORIZE_ORGANIZATION_ID env var)
356356
- `connectorName`: Name for the connector
357357
- `platformUrl` (optional): URL of the Vectorize API (defaults to "https://api.vectorize.io/v1")
358358

@@ -364,8 +364,8 @@ async function createVectorizeGDriveConnector(
364364

365365
```typescript
366366
const config = {
367-
authorization: process.env.VECTORIZE_TOKEN!,
368-
organizationId: process.env.VECTORIZE_ORG!,
367+
authorization: process.env.VECTORIZE_API_KEY!,
368+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID!,
369369
};
370370
371371
const connectorId = await createVectorizeGDriveConnector(
@@ -404,8 +404,8 @@ async function createWhiteLabelGDriveConnector(
404404

405405
```typescript
406406
const config = {
407-
authorization: process.env.VECTORIZE_TOKEN!,
408-
organizationId: process.env.VECTORIZE_ORG!,
407+
authorization: process.env.VECTORIZE_API_KEY!,
408+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID!,
409409
};
410410
411411
const connectorId = await createWhiteLabelGDriveConnector(
@@ -442,8 +442,8 @@ async function createVectorizeDropboxConnector(
442442

443443
```typescript
444444
const config = {
445-
authorization: process.env.VECTORIZE_TOKEN!,
446-
organizationId: process.env.VECTORIZE_ORG!,
445+
authorization: process.env.VECTORIZE_API_KEY!,
446+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID!,
447447
};
448448
449449
const connectorId = await createVectorizeDropboxConnector(
@@ -482,8 +482,8 @@ async function createWhiteLabelDropboxConnector(
482482

483483
```typescript
484484
const config = {
485-
authorization: process.env.VECTORIZE_TOKEN!,
486-
organizationId: process.env.VECTORIZE_ORG!,
485+
authorization: process.env.VECTORIZE_API_KEY!,
486+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID!,
487487
};
488488
489489
const connectorId = await createWhiteLabelDropboxConnector(

docs/dropbox/vectorize-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Add the following environment variables to your Next.js application:
2525

2626
```env
2727
# Vectorize credentials
28-
VECTORIZE_ORG=your-organization-id
29-
VECTORIZE_TOKEN=your-api-key
28+
VECTORIZE_ORGANIZATION_ID=your-organization-id
29+
VECTORIZE_API_KEY=your-api-key
3030
```
3131

3232
## Step 2 (Optional): Create Connector API Route
@@ -53,8 +53,8 @@ export async function POST(request: Request) {
5353

5454
// Gather environment variables for your Vectorize config
5555
const config: VectorizeAPIConfig = {
56-
organizationId: process.env.VECTORIZE_ORG ?? "",
57-
authorization: process.env.VECTORIZE_TOKEN ?? "",
56+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
57+
authorization: process.env.VECTORIZE_API_KEY ?? "",
5858
};
5959

6060
// Validate environment variables
@@ -92,8 +92,8 @@ import { NextRequest, NextResponse } from "next/server";
9292
export async function GET(request: NextRequest) {
9393
try {
9494
// Get authentication details from environment variables
95-
const apiKey = process.env.VECTORIZE_TOKEN;
96-
const organizationId = process.env.VECTORIZE_ORG;
95+
const apiKey = process.env.VECTORIZE_API_KEY;
96+
const organizationId = process.env.VECTORIZE_ORGANIZATION_ID;
9797

9898
if (!apiKey || !organizationId) {
9999
return NextResponse.json({

docs/dropbox/white-label-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Add the following environment variables to your Next.js application:
3838

3939
```env
4040
# Vectorize credentials
41-
VECTORIZE_ORG=your-organization-id
42-
VECTORIZE_TOKEN=your-api-key
41+
VECTORIZE_ORGANIZATION_ID=your-organization-id
42+
VECTORIZE_API_KEY=your-api-key
4343
4444
# Dropbox credentials
4545
DROPBOX_APP_KEY=your-dropbox-app-key
@@ -68,8 +68,8 @@ export async function POST(request: Request) {
6868

6969
// Gather environment variables for your Vectorize config
7070
const config: VectorizeAPIConfig = {
71-
organizationId: process.env.VECTORIZE_ORG ?? "",
72-
authorization: process.env.VECTORIZE_TOKEN ?? "",
71+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
72+
authorization: process.env.VECTORIZE_API_KEY ?? "",
7373
};
7474

7575
// Validate environment variables
@@ -172,8 +172,8 @@ export async function POST(request: NextRequest) {
172172

173173
// Configure Vectorize API
174174
const config: VectorizeAPIConfig = {
175-
organizationId: process.env.VECTORIZE_ORG ?? "",
176-
authorization: process.env.VECTORIZE_TOKEN ?? "",
175+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
176+
authorization: process.env.VECTORIZE_API_KEY ?? "",
177177
};
178178

179179
// Manage the user

docs/general-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ All interactions with the Vectorize API require authentication using a Vectorize
1616

1717
```typescript
1818
const config = {
19-
authorization: 'Bearer your-token', // Use VECTORIZE_TOKEN environment variable
19+
authorization: 'Bearer your-token', // Use VECTORIZE_API_KEY environment variable
2020
organizationId: 'your-org-id'
2121
};
2222
```
@@ -37,8 +37,8 @@ Most functions in the SDK require a `VectorizeAPIConfig` object:
3737

3838
```typescript
3939
interface VectorizeAPIConfig {
40-
authorization: string; // Bearer token for authentication - use VECTORIZE_TOKEN env var
41-
organizationId: string; // Your Vectorize organization ID - use VECTORIZE_ORG env var
40+
authorization: string; // Bearer token for authentication - use VECTORIZE_API_KEY env var
41+
organizationId: string; // Your Vectorize organization ID - use VECTORIZE_ORGANIZATION_ID env var
4242
}
4343
```
4444

docs/google-drive/vectorize-guide.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Add the following environment variables to your Next.js application:
2525

2626
```env
2727
# Vectorize credentials
28-
VECTORIZE_ORG=your-organization-id
29-
VECTORIZE_TOKEN=your-api-key
28+
VECTORIZE_ORGANIZATION_ID=your-organization-id
29+
VECTORIZE_API_KEY=your-api-key
3030
```
3131

3232
## Step 2 (Optional): Create Connector API Route
@@ -53,8 +53,8 @@ export async function POST(request: Request) {
5353

5454
// Gather environment variables for your Vectorize config
5555
const config: VectorizeAPIConfig = {
56-
organizationId: process.env.VECTORIZE_ORG ?? "",
57-
authorization: process.env.VECTORIZE_TOKEN ?? "",
56+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
57+
authorization: process.env.VECTORIZE_API_KEY ?? "",
5858
};
5959

6060
// Validate environment variables
@@ -92,8 +92,8 @@ import { NextRequest, NextResponse } from "next/server";
9292
export async function GET(request: NextRequest) {
9393
try {
9494
// Get authentication details from environment variables
95-
const apiKey = process.env.VECTORIZE_TOKEN;
96-
const organizationId = process.env.VECTORIZE_ORG;
95+
const apiKey = process.env.VECTORIZE_API_KEY;
96+
const organizationId = process.env.VECTORIZE_ORGANIZATION_ID;
9797

9898
if (!apiKey || !organizationId) {
9999
return NextResponse.json({
@@ -186,8 +186,8 @@ export async function POST(request: NextRequest) {
186186

187187
// Get Vectorize config
188188
const config: VectorizeAPIConfig = {
189-
organizationId: process.env.VECTORIZE_ORG ?? "",
190-
authorization: process.env.VECTORIZE_TOKEN ?? "",
189+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
190+
authorization: process.env.VECTORIZE_API_KEY ?? "",
191191
};
192192

193193
// Get request body

docs/google-drive/white-label-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Add the following environment variables to your Next.js application:
3939

4040
```env
4141
# Vectorize credentials
42-
VECTORIZE_ORG=your-organization-id
43-
VECTORIZE_TOKEN=your-api-key
42+
VECTORIZE_ORGANIZATION_ID=your-organization-id
43+
VECTORIZE_API_KEY=your-api-key
4444
4545
# Google OAuth credentials
4646
GOOGLE_OAUTH_CLIENT_ID=your-client-id
@@ -70,8 +70,8 @@ export async function POST(request: Request) {
7070

7171
// Gather environment variables for your Vectorize config
7272
const config: VectorizeAPIConfig = {
73-
organizationId: process.env.VECTORIZE_ORG ?? "",
74-
authorization: process.env.VECTORIZE_TOKEN ?? "",
73+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
74+
authorization: process.env.VECTORIZE_API_KEY ?? "",
7575
};
7676

7777
// Validate environment variables
@@ -175,8 +175,8 @@ export async function POST(request: NextRequest) {
175175

176176
// Configure Vectorize API
177177
const config: VectorizeAPIConfig = {
178-
organizationId: process.env.VECTORIZE_ORG ?? "",
179-
authorization: process.env.VECTORIZE_TOKEN ?? "",
178+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID ?? "",
179+
authorization: process.env.VECTORIZE_API_KEY ?? "",
180180
};
181181

182182
// Manage the user

docs/types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ Configuration for Vectorize API requests.
325325

326326
```typescript
327327
type VectorizeAPIConfig = {
328-
/** Bearer token (authorization) - use VECTORIZE_TOKEN environment variable */
328+
/** Bearer token (authorization) - use VECTORIZE_API_KEY environment variable */
329329
authorization: string;
330330

331-
/** Organization ID - use VECTORIZE_ORG environment variable */
331+
/** Organization ID - use VECTORIZE_ORGANIZATION_ID environment variable */
332332
organizationId: string;
333333
};
334334
```
@@ -342,8 +342,8 @@ type VectorizeAPIConfig = {
342342

343343
```typescript
344344
const config: VectorizeAPIConfig = {
345-
authorization: process.env.VECTORIZE_TOKEN!,
346-
organizationId: process.env.VECTORIZE_ORG!
345+
authorization: process.env.VECTORIZE_API_KEY!,
346+
organizationId: process.env.VECTORIZE_ORGANIZATION_ID!
347347
};
348348

349349
// Use the config with API functions

0 commit comments

Comments
 (0)