2

I am trying to consume the Flagsmith APIs as documented here .

It seems some APIs like -- /flags/ need "x-environment-key" header, which is working.

But for others like /environments/ "x-environment-key" does not work. I have tried a bearer token authorisation by obtaining the API key ( Authorization: Bearer <> ). But that doesn't work either. There is no clear documentation on the authentication mechanism ( or I have missed it ).

Can someone throw some pointers ?

1 Answer 1

3

x-environment-key is for the SDK endpoints, where as /environments is an admin endpoint used in the dashboard to list a project's environments. Those endpoints are protected via an API token, so you'd need to send

authorization: Token $API_TOKEN

You can find your API token in your account settings under keys

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.