https://www.growthbook.io/ logo
n

numerous-army-92497

02/24/2023, 2:18 PM
Question about using the REST API with auth: when we try •
curl <https://our-api-host> -u secret_OurSecretValue:
we get the error
{"status":401,"message":"Format is Authorization: Bearer [token]"
and when we try •
curl <https://our-api-host> -H "Authorisation: Bearer secret_OurSecretValue"
we get the error
{"status":401,"message":"jwt malformed"}
Is there a special way we need to format the secret value? Our UI is behind SSO using Azure AD (if that matters at all for the API)
f

future-teacher-7046

02/24/2023, 2:20 PM
The REST API has a path prefix of
/api/v1
to work. So
Copy code
curl <https://our-api-host/api/v1> -u secret:
If you just hit the API host directly, it requires you to go through the normal SSO auth flow before using
👍 1
n

numerous-army-92497

02/24/2023, 2:26 PM
Got it, that was the issue. Thank you :)
9 Views