SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Github API: find username using accesstoken

    Hello,

    I am stuck: I manage to get users to log in to my app using github. I get an access token. But once I have reached that stage, how do I retrieve info about that user? Most requests require a username... which I don't have.

    It seems dumb since I have an access token, and I am probably missing something. Could someone tell me what it is?

    What's the correct endpoint to find a username? Should I use curl?

    Regards,

    -jj.

  2. #2
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,397
    Mentioned
    63 Post(s)
    Tagged
    0 Thread(s)
    Assuming you're using their v3 API:

    https://api.github.com/user

    As described at http://developer.github.com/v3/users...enticated-user
    Salathe
    Software Developer and PHP Manual Author.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •