1

I was trying to create an issue on GitHub using GitHub's API with Postman.

It does not work even after I provide the personal token generated on my site.

Does someone know what goes wrong?

enter image description here

DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
Han Chen
  • 11
  • 1

1 Answers1

0

As documented, a trailing slash in your URL

https://api.github.com/repos/hanc3/testapi/issues/

would result in an error.

Expect it would be a 405 (Method Not Allowed), when adding a slash at the endpoint causes the API to reject

In your case, it is a 404, which means you did not properly authenticate when calling that API

Double-check your postman Authorization tab: it should include a Authorization: token

And headers:

Content-Type : application/json 
Authorization : token 

See "Rest API v3, Other Authentication Methods"

DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250