Skip to content

Commit a4a81a0

Browse files
authored
Merge pull request #44 from omri-rulf/update_API_key_URL_to_current_CP_location
fix: update API token URL and Discover example (README + error message)
2 parents f62782f + 59bcf80 commit a4a81a0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pip install brightdata-sdk
1313

1414
## Configuration
1515

16-
Get your API Token from the [Bright Data Control Panel](https://brightdata.com/cp/api_keys):
16+
Get your API Token from the [Bright Data Control Panel](https://brightdata.com/cp/setting/users):
1717

1818
```bash
1919
export BRIGHTDATA_API_TOKEN="your_api_token_here"
@@ -194,7 +194,7 @@ async with BrightDataClient() as client:
194194
num_results=10,
195195
)
196196
for item in result.data:
197-
print(f"[{item['relevance_score']:.2f}] {item['title']} {item['url']}")
197+
print(f"[{item['relevance_score']:.2f}] {item['title']} {item['link']}")
198198
```
199199

200200
For long-running discoveries, trigger and poll separately:

‎src/brightdata/client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def _load_token(self, token: Optional[str]) -> str:
211211
f"Provide token in one of these ways:\n"
212212
f" 1. Pass as parameter: BrightDataClient(token='your_token')\n"
213213
f" 2. Set environment variable: {self.TOKEN_ENV_VAR}\n\n"
214-
f"Get your API token from: https://brightdata.com/cp/api_keys"
214+
f"Get your API token from: https://brightdata.com/cp/setting/users"
215215
)
216216

217217
async def _ensure_zones(self) -> None:

0 commit comments

Comments
 (0)