Github Apps Token #24635
Replies: 4 comments
-
I send my code here :
Like to see your answers😁 |
Beta Was this translation helpful? Give feedback.
-
Okay so the documentation isn’t very clear, but maybe this section on authenticating with JWT is implying that the ‘exp’ can be at most 10 minutes later than the ‘iat’? If this is the case, then I think that |
Beta Was this translation helpful? Give feedback.
-
thanks bro. thats really helpful |
Beta Was this translation helpful? Give feedback.
-
import requests Your GitHub Personal Access TokenGITHUB_TOKEN = "your_github_personal_access_token" Repository detailsrepo_name = "30-Days-Python-Challenges" GitHub API URL for creating a repositoryurl = f"https://api.github.com/user/repos" Repository payloadpayload = { Headers for the API requestheaders = { Create the repositoryresponse = requests.post(url, json=payload, headers=headers) if response.status_code == 201: |
Beta Was this translation helpful? Give feedback.
-
Today, I am working on final assignment for graduation criteria in my university. I am making a system that can check students’ answer (test, parse and send it to REST API backend). And I make a system that can generate repository by it’s template. I am using a Github Apps to interact with Github API.
But I have a problem when creating Github Apps installations access token. Sometimes it goes wrong. It respond me like this :
Client error:
POST https://api.github.com/app/installations/INSTALLATIONS_ID/access_tokens
resulted in a401 Unauthorized
response:\n{“message”:"‘Expiration time’ claim (‘exp’) is too far in the future",“documentation_url”:“GitHub REST API - GitHub Docs” (truncated…)\nIts started today. Yesterday and 1-2 month ago, I made this system (I mean block of code) and always working. Is there any new limitation to generate token every 1 minute and no shorter time?
Beta Was this translation helpful? Give feedback.
All reactions