Skip to main content
Hi all! Having trouble understanding how to auth in python using a Collection ID and Collection token. I don't see any example code in documentation. Anyone able to help?
Hi @eknudsen :wave: - for using a Collection tokens, you will use the Collection ID instead of your Username. This should help! ```import requests from requests.auth import HTTPBasicAuth collection_id = 'add-collection-id-here' url = 'https://api.getguru.com/api/v1/cards' headers = {'accept': 'application/json'} response = requests.get(url, headers=headers, auth=HTTPBasicAuth("collection-id", "collection-token)") response.json return response```
This worked perfectly @mhouston, thank you!