Artehsk Rana
Artehsk Rana

Reputation: 37

Twitter REST API - how to check if an app has certain permission?

Before attempting to write to a user's timeline, I would want to check if an app has write access. How do I check this?

Upvotes: 3

Views: 67

Answers (1)

Dilip Raj Baral
Dilip Raj Baral

Reputation: 3070

The response to API requests with a valid access token will have a header named X-Access-Level. You can look for the value read-write there. Ideally, you will make an API request toaccount/verify_credentials node for this purpose.

Upvotes: 5

Related Questions