airbytehq / airbytehq/airbyte-api-python-sdk

SDK Basic Authentication Error

Offen
#123 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
61
Forks
27
Ø Merge
4 Min.
Gemergte PRs (30 T.)
2

Beschreibung

Hi team, I'm using the SDK and got this error why trying to init Airbyte Client using SchemeBasicAuth:
```
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): airbyte.staging.data-engineering.myteksi.net:443
send: b'GET /api/v1/health HTTP/1.1\r\nHost: \r\nuser-agent: speakeasy-sdk/python 0.52.2 2.474.15 1.0.0 airbyte-api\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Content-Type: text/html
header: Date: Thu, 26 Jun 2025 05:59:26 GMT
header: WWW-Authenticate: Basic realm=""
header: Content-Length: 172
header: Connection: keep-alive
DEBUG:urllib3.connectionpool: "GET /api/v1/health HTTP/1.1" 401 172
Error: API error occurred: Status 401

401 Authorization Required

```

here's my code:
```
client = airbyte_api.AirbyteAPI(
server_url=Config.AIRBYTE_SERVER_URL,
security=models.Security(
basic_auth=models.SchemeBasicAuth(
username=Config.AIRBYTE_USERNAME,
password=Config.AIRBYTE_PASSWORD
)
)
)

try:
health = client.health.get_health_check()
print(health)
except errors.SDKError as e:
print(f"Error: {e}")
```

Assume that all my credentials and configs are valid (because I've alr tested on Postman and it responsed successfully.
I asked Cursor to diagnose the error and it said that there's a problem with Basic Authentication of the SDK.

Did I missed any important steps? Could you kindly advice? TYSM!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.