adorable-church-87010
10/10/2024, 9:32 AM"msg":"connection polling error: status code is 400"
when i try manually curl the GB Api
curl -X GET <https://cdn.growthbook.io/api/v1/sdk-connections>\?withProxy\=1\&limit\=100\&offset\=0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $BEARER" \
-H "User-Agent: GrowthBook Proxy" --verbose
Output:
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host <http://cdn.growthbook.io|cdn.growthbook.io> left intact
<Error><Code>InvalidArgument</Code><Message>Unsupported Authorization Type</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Bearer secret_readonly_7GNSLiDqUbvCyndDbudC4cAmRNjV5taRXAGxpnw</ArgumentValue><RequestId>FDB6WQH4SQR40FM2</RequestId><HostId>opS43/LkqOhoMtvwDxviOtI1FOxyPMg5GhhM2rPSJd2iymSmL5Epdu8oUoWa97ZdpmwPKGaucuY=</HostId></Error>
Trying with secret key within https://app.growthbook.io/account/personal-access-tokens or https://app.growthbook.io/settings/keys seems not works, any help will appreciated. Thank youambitious-soccer-63281
01/03/2025, 9:38 AMfresh-football-47124
fresh-football-47124
happy-autumn-40938
01/06/2025, 5:07 AMCREATE_CONNECTIONS_FROM_ENV
that lets you manually seed the connections when the proxy boots (set to "true"
or "1"
). Then, you can pass in the connections you want to proxy using this format:
CONNECTION.1.API_KEY="api_1234"
CONNECTION.1.SIGNING_KEY="secret_1234"
CONNECTION.2.API_KEY="api_abcd"
CONNECTION.2.SIGNING_KEY="secret_abcd"
CONNECTION.2.USE_ENCRYPTION="1"
CONNECTION.2.ENCRYPTION_KEY="enc_12345"
# etc...
Finally turn off POLL_FOR_CONNECTIONS
so that you won't keep seeing "connection polling error" in the logs.happy-autumn-40938
01/06/2025, 5:16 AM<https://cdn.growthbook.io/api/v1/sdk-connections>
. Can you instead try it with:
<https://api.growthbook.io/api/v1/sdk-connections>
(api.growthbook.io)?ambitious-soccer-63281
01/06/2025, 5:36 AMambitious-soccer-63281
01/06/2025, 6:39 AM