user1618465
user1618465

Reputation: 1941

GitHub Gist access granularity read/write API

Can I create an access token in GitHub so it can only create gists (write access) but it cannot read the created ones?

Thank you

Upvotes: 1

Views: 702

Answers (1)

Christian Specht
Christian Specht

Reputation: 36431

I'm afraid that's not possible.

Did you read the page about authentication for the Gist API?

Quote from the link:

Authentication

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 gist OAuth scope is required.

So you can revoke write access to gists, but not read access.

When you create a new gist via the API, you can make it public or secret.
(see Types of gists)

But even secret gists are not really secret, anyone who knows the URL can access them.
Plus, you need to authenticate in order to create gists, and when you're authenticated, you can list all of a user's gists (including the secret ones).

Upvotes: 1

Related Questions