I’ve replaced the auth token with the one that was emailed to me after I registered for API access but the print statement still doesn’t show anything:
Are you encoding your token? From the documentation:
sampleuser:7eaa6338-a097-4221-ac04-b6120fcc4d49
This string must then be encoded using Base64 Encoded to form the Token, which will be the same length as the example above, but include letters and numbers. For our example, we would have:
You also aren’t specifying what return type you want (application/xml or application/json).
A known working snippet in Java that you should be able to translate is below. Of note, the path is the full URL to the desired endpoint, and clearAuth is the username:password that was emailed by FIRST.
You probably want an f string for this. Right now your authorization header is literally just 'Basic {auth}', instead of using the actual value of the auth variable. Try using 'Authorization: f'Basic {auth}' instead.