Collections API 403

rest
api

#1

Hello,

I’m trying to do some work with the Collections API but can’t get authentication working.

I am initially just trying to get a list of my own collections:

https://api.twitter.com/1.1/collections/list.json?screen_name=timothyclifford

But this fails and I get back:

{ statusCode: 403, data: '{"errors":[{"code":87,"message":"Client is not permitted to perform this action."}]}' }

If I make the exact same call (tokens etc) to another user centric API eg https://api.twitter.com/1.1/statuses/home_timeline.json I get a response without error.

Is anyone able to explain why this might be?

Thank you :smile:


#2

Are you using Fabric, or have you had your app token whitelisted for access to the Collections endpoints?

Per the documentation:

Collection APIs are automatically enabled for Twitter applications using Fabric Twitter Kit and Twitter Official Partners. The Twitter Official Partner program is for enterprise organizations building B2B solutions.


#3

I must have missed that wording sorry Andy!

What’s the best way to get access to use this endpoint?

I’ve signed up for Fabric, do you know how long activation may take?

Thanks again


#4

Should be fairly fast - Fabric is a mobile SDK aimed at bringing content into your Android or iOS apps. For instance, here’s information on how to include a Collection in an Android app.


#5

Awesome, thank you Andy :smiley:


#6

Hi again Andy,

I’ve signed up for Fabric but still can’t gain access to the API.

Do you need to have a Fabric app running before access is granted?

We are building a web based app rather than native mobile so I’m not sure how best to get access?

Thank you,
Tim


#7

Yes, that’s why I mentioned that Fabric is for mobile developers. Fabric apps running on iOS or Android can access the Collections API. For web-based apps, you should apply for elevated privileges via our Platform Support form. I’d recommend using the “other” option to submit your request. Your app will be reviewed before whitelisting.