Github app bad credentials on repo with installed app


Hi I have created a github app, then I installed that app on a repository of mine to test it out. I was able to generate the JWT token, but when I try to create a comment in a PR using the the JWT genereate I get the error bad credentials.

Steps followed ot create github app:

  1. Created App
  2. Install app on repo i wanted to try
  3. Gave permission


You need to get an installation token using the JWT and then use that token for other API requests. Note that the token has an expiration and will need to be refreshed before it expires (using the JWT again).


Thanks on the reply, i was that I needed to use the installation token