Last active
February 21, 2024 16:05
-
-
Save pelson/47c0c89a3522ed8da5cc305afc2562b0 to your computer and use it in GitHub Desktop.
Example of authenticating a GitHub app using jwt in Python
This was super helpful. Thank you so much!
Just in case is wondering, these are the dependencies needed. Do not install jwt but pyjwt. (see https://stackoverflow.com/questions/33198428/jwt-module-object-has-no-attribute-encode).
certifi==2022.9.24
cffi==1.15.1
charset-normalizer==2.1.1
cryptography==38.0.3
idna==3.4
pycparser==2.21
PyJWT==2.6.0
requests==2.28.1
urllib3==1.26.12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In [60] code block
resp = requests.post('https://api.github.com/installations/{}/access_tokens'.format(installation_id),will be
resp = requests.post('https://api.github.com/app/installations/{}/access_tokens'.format(installation_id),