Reputation: 1984
I've been puzzling through the github API docs (v3) and I'm kind of stumped. For the initial step - the acquisition of the access token - it appears that the only way to do it within a web app is to rely on a callback URL, which gets posted a temporary code. That's then used in subsequent queries to their API.
Does anyone know if this can all be done in a single step, e.g. cURL - i.e. within a single block of code in one page? Passing off control flow to a different URL causes innumerable problems for my particular scenario.
Thanks! :)
Upvotes: 4
Views: 2047
Reputation: 3196
This is the nature of OAuth. You could you try to use the basic authentication method, but if that doesn't fit your needs, then PHP has an OAuth library that should make authentication pretty painless. There are also a few PHP wrappers out there for the Github API, e.g. php-github-api.
Upvotes: 1