- python>=3.13
- requests
pip install requestspip install copilot-authSteps to fetch copilot github token :
- Fetch Github Access token using device flow
- Fetch Copilot Github token using Github Access token
import copilot_auth as ca
# Custom token handler to process the token
def token_handler(token):
print(token)
# Fetch the github access token
ca.authenticate_github_access_token([token_handler])
# Fetch the copilot github token using the github access token
ca.authenticate_copilot_token([token_handler])