I have manually added a web hook to my repository, but when I query the repository using the API I get
{
"message": "Not Found"
}
what is wrong?
the url: https://api.github.com/repos/akonsu/kamyanov-art.com/hooks/
The API would return the login of each follower, along with other data about the followers that you don't need. Then, for each follower, you would need to make a request to GET /users/{username}/followers .
Webhooks allow you to build or set up integrations, such as GitHub Apps or OAuth Apps, which subscribe to certain events on GitHub.com. When one of those events is triggered, we'll send a HTTP POST payload to the webhook's configured URL.
The payload URL is the URL of the server that will receive the webhook POST requests.
First, don't put the extra '/
' at the end.
That will get you an message "Not Found
" every time, authenticated or not.
Second, to add to Ivan's answer, you need to authenticate to access that information about a repo (public or private).
As mentioned in the "API Getting Started" page:
HTTP/1.1 404 Not Found
{
"message": "Not Found"
}
Oh noes! Where did it go?
If you’re a grizzled HTTP user, you might expect a 403 instead.
Since we don’t want to leak information about private repositories, the GitHub API returns a 404 in this case, as if to say “we can neither confirm nor deny the existence of this repository.”
That is why you see a "Not Found
" here.
See issue 294
fwiw, I was scratching my head on this same issue trying to debug a hook, and the solution was to pass basic authentication on the request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With