Showing results for 
Show  only  | Search instead for 
Did you mean: 

Who Me Too'd this topic

Mandatory Request Headers for Redlock API - x-redlock-auth

L1 Bithead

Hi- I'm trying to use the API with Python and am having some trouble getting authorized to obtain data using the x-redlock-auth request header.


First, let me add the disclaimer that I'm no Python expert so the help is appreciated even if it seems basic. I also understand that PAN/ Redlock isn't here to teach us how to code but I'm looking for an API doc example at a minimum which seems reasonable.


BTW: the API documentation is great and it's cool that there are code examples!


That said, I'm left wondering about using the Python requests module and how to state the x-redlock-auth mandatory request header.


The docs say that the x-redlock-auth and Content-Type are mandatory. I can successfully declare declare content type as application/json using standard Python response module code.


I'm also able to get my JWT andI can define the content type ok as I can get my JWT and parse into a variable from the successful JSON response.


However, I don't see example code to use x-redlock-auth in the request header. 


In the examples there is a pop-up for x-redlock-auth prompting for the JWT but the code example doesn't refelct how to use in the params statement of the requests module.


Example code snippet from the REST API Doc's - generated using the the query params.


code snippet from Redlock REST API docscode snippet from Redlock REST API docs

Can anyone provide an example of defining the headers for the required  x-redlock-auth mandatory request headers in the context of this?

Thanks for any help! Would love to automate Redlock login monitoring into a security validation workflow at my organization.

Who Me Too'd this topic