Twitter is in trouble. For most people, it's still this confusing, niche social network that they feel no need or desire to be a part of. For those who already are a part of it, it's becoming less valuable by the minute. A big contributor to this decline is Twitter's API.
If you don't know what an API (application programming interface) is, it's what allows other developers to integrate with Twitter. It allows anybody to build an app and pull data from and push data to the service.
Twitter's API is one of the most used for a few reasons. For one, it's the simplest of the social media platforms. While at first Twitter's fundamental platform of allowing only 140 characters per tweet seems very limiting, you can actually do a lot more with Twitter, especially through their API, than you can through other services.
Where Instagram doesn't allow clickable links in posts, Twitter lives by them. Where Facebook makes it difficult to tag other users in posts through it's API (and only more recently supported it in their own platform), Twitter's '@username' structure has always made it ridiculously easy to do. Twitter essentially doesn't restrict outside apps from doing anything just as easily as it can be done through Twitter itself.
At the same time, Twitter's simplicity is also it's undoing. Instagram was built on the back of it's filters. It's a visual medium which means it's hard to automate. Facebook is built on engagement with a very personal network of friends and family - people you know and interact with (or at least did at some point) outside of the network. It too is a highly visual medium which is the reason you see far more images in your feed these days and almost no text-only posts.
Twitter, on the other hand, was for a very long time a text-based stream of stuff people said that most outsiders couldn't understand. It's only been more recently that they've added video and images in your stream, and started to curate posts instead of showing a straight timeline from accounts you follow. The catch 22 is that every time Twitter makes one of these changes, it makes Twitter less "Twitter" and more like all of the other social networks. And there's just no reason anybody would leave Facebook for Twitter just to get the same functionality they already enjoy with Facebook.
The core of Twitter's problem is that it's simply not scalable to the extent of the other social networks. Twitter's early growth was driven by users who were able to connect with celebrities and athletes who actually responded to them. It gave "regular" people a level of access they'd never dreamed of. But as more people join the platform and follow and attempt to connect with those celebrities, the less access everyone has to them.
Twitter also enjoyed a high-level of engagement with young people eagerly looking for an alternative to Facebook to get away from their parents. Unfortunately for them, EVERYTHING on Twitter is 100% public and their parents soon followed them there too (hello Snapchat).
Then came the marketers, and the real beginning of the end. There are now more services than you can count that you can sign up for with your Twitter account, provide some keywords and a few samples of accounts you would follow, and out goes the software (using Twitter's API) to follow thousands of users, like Tweets, and post content all on your behalf. Unfortunately, it seems like more Twitter users are using these tools than not. So as you see your follower counts rise, your following counts rise with them; and just like you can't read the Tweets of the 10,000 people you're now following, the 10,000 followers you now have aren't reading yours either.
Are you thinking, that's fine, I'll just unfollow the accounts after they follow me. Sorry, but they thought of that too and the same software will also unfollow those users as soon as they do that to you.
All of this culminates in Twitter becoming a noisy mess, which is an exponential problem. As Twitter gets noisier, each Tweet becomes less valuable. To compensate, content-producers end up Tweeting far more frequently in the hopes they'll actually show up in their follower's feeds, resulting in even more noise. As content-consumers find less value in each Tweet, they need to spend more time sifting through the noise to get the same value out of the platform as a whole until they get frustrated and give up, further devaluing each tweet and each follower.
Ultimately, all of this means the only users left on the platform are too busy pushing their own content with nobody consuming it.
Twitter is in real trouble of becoming MySpace (which is still a thing, btw), and it's going to take something big for them to reverse course. Shutting down (or at the very least limiting the scope of) their API might just be the risky "everybody hates it at first" move they need to stay relevant.