Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for public API endpoints #3593

Closed
RAnders00 opened this issue Sep 24, 2019 · 5 comments
Closed

Add documentation for public API endpoints #3593

RAnders00 opened this issue Sep 24, 2019 · 5 comments

Comments

@RAnders00
Copy link

Third-party applications, bots, websites etc. often find the need to integrate with BetterTTV, and in the past they've used the v2 API for that with great success.

It would be great to hear:

  • When the old (https://api.betterttv.net/2/) API is being deprecated, and when it will be removed,
  • and what endpoints of the new API (https://api.betterttv.net/3/) third-party devs are supposed and allowed to be used

I'm mostly looking at /cached/users/twitch/:channelID and /cached/emotes/global in my applications.

It would be great to have a .md file in this repository, or a page on the website to link to, as a reference for the v3 API, if that was possible, and maybe some guidelines for consuming and implementing against the API.

@night
Copy link
Owner

night commented Oct 14, 2019

Currently we don't provide maintenance/support for usage of our API in other applications, which is why we don't document our APIs. Using any of our APIs is currently at your own risk, and could break/change at any time (though that's not something we try to do, hence versioning).

v2 will be removed soon, but there are still some internal services using v2 (which is the only reason it remains online).

While we still don't officially support v3, you could consider the endpoints used within our extension to be deemed as safer to use (which are the cached ones you noted).

@makedir
Copy link

makedir commented Oct 29, 2022

@night Because my ticket was closed/moved, I am asking here again:

https://api.betterttv.net/3/
global: https://api.betterttv.net/3/cached/emotes/global
badges: https://api.betterttv.net/3/cached/badges
bttv channel emotes: https://api.betterttv.net/3/cached/users/twitch/121059319
ffz channel emotes: https://api.betterttv.net/3/cached/frankerfacez/users/twitch/121059319
changelog: https://api.betterttv.net/3/cached/changelog

All gone. The v4 api was working some weeks ago, and now it isnt anymore. It just redirects to https://betterttv.com/ instead of giving an json output.

@night
Copy link
Owner

night commented Oct 29, 2022

requests appear to succeed normally for the links specified:

curl https://api.betterttv.net/3/cached/users/twitch/121059319 --head
HTTP/2 200 

@Nerixyz
Copy link

Nerixyz commented Oct 29, 2022

requests appear to succeed normally for the links specified:

I suppose they're setting Sec-Fetch-Mode: navigate (When navigating to the URL in the browser, MDN docs):

curl "https://api.betterttv.net/3/cached/users/twitch/121059319" -H "Sec-Fetch-Mode: navigate" --head
HTTP/1.1 302 Moved Temporarily

@makedir
Copy link

makedir commented Oct 29, 2022

Weird... There was a change made to the API though, in the past 1-3 weeks. It seems to not send back jsons for some headers? That seems to be changed. I was not getting API feedback the other day in my app, but I just tested it this moment, and it seems to work again. Do you need to pass some specific header information for the API to work which was changed? If you open the API end points in a browser, it redirects to https://betterttv.com/. That was still working a few weeks ago.

Repository owner locked and limited conversation to collaborators Jan 16, 2023
@night night converted this issue into discussion #5851 Jan 16, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants