Please Help-How to use authorize tokens in Python script we now have a license & previous use of community edition resulted in errors

Hello, please help I have an Anaconda license (previously used community edition) & I’m searching for advice & sample code to use within Python code to verify the Authorization token Anaconda provides with license edition.
I guess using http request like below link, but I am unsure)

Previously used community edition and as a result obtained errors e.g.,502, connection reset & now have a license and need to find out how to use the token given with the license in the code to run the Python script for a Jenkins build in our code to alleviate the errors.
Thanks in advance.