4

I am trying to list all gist from a group of users using the github api. This is working really well but I can't seem to get it to return private gists for myself or any others users.

I know that you can set scope in the request but I don't get how I would set this in my JQuery request and what scope should I use to get private gists?

Some of my code is below:

var the_url = 'https://api.github.com/users/'+ encodeURIComponent(user) +'/gists';

      $.oauth ({
        consumerKey: 'xxxxxxxxxxxxxxxxx', 
        consumerSecret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 
        type: "GET",
        url: the_url,
        data: {},
        dataType: 'json',
        async: false,
0

1 Answer 1

1

You'll need a user to grant access via oAuth.

You can read public gists and create them for anonymous users without a token; however, to read or write gists on a user’s behalf the gists oAuth scope is required.

http://developer.github.com/v3/oauth/#scopes

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.