Skip to content

FalconPy gives 401 while using bearer token after Oauth2 auth. #131

Answered by jshcodes
devkigauravpal asked this question in Q&A
Discussion options

You must be logged in to vote

Ohh yeah, That gets me 200 OK.
Thanks this helps.
So to conclude the solution is when we instantiate the classes we have to explicitly pass base-url parameter. Right?

Correct. If you are using a Service Class on a CrowdStrike cloud that is not US-1, you need to specify the base_url.

To make things easier, you can also use credential or object authentication. This will allow you to only have to specify the base_url the one time.

Credential authentication

If you use this method, you can get by with only having to specify base_url the one time as you don't need to create an instance of the OAuth2 Service Class.

falcon = FalconDetects.Detects(creds={
     'client_id': falcon_client_id,
     '…

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jshcodes
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
API usage General API usage issues and questions
2 participants
Converted from issue

This discussion was converted from issue #130 on April 16, 2021 04:19.