Closed TSedlar closed 6 years ago
Maybe you have the authorization confused? You need to auth against their oauth endpoint with users username and password to get the oauth token you would send in subsequent calls to update their library.
@astraldragon
I don't believe they have that implemented currently. The official node API has this listed for authentication:
and the documentation lists the following:
so the key in the documentation should work.
Right but to modify someone's library you have to be authenticated as that person. If that wasn't the case you'd be able to modify everyone's libraries :)
You have to use a combination the client id, secret, username and password to get an oauth token back from the api. The auth endpoint lives at: https://kitsu.io/api/oauth/token.
@astraldragon
I've also tried using the Basic authentication
Is there another way to go about it? Because that works fine through MyAnimeList
Edit: I've just seen your edit and I'll approach that soon, thank you!
MyAnimeList is an entirely different method of authentication. Kitsu uses oauth so as far as I know basic auth will not work. You could use something like https://github.com/lelylan/simple-oauth2 or https://github.com/mulesoft/js-client-oauth2 to get yourself up and running quick
Thanks @astraldragon!
Fixed in 901adf7
The Kitsu PATCH protocol does not work for library modifications.
I have contacted the developer of the Kitsu API to get more information on this.
There is a workaround to modify your library and grab the Bearer AUTH that Kitsu will generate, but it only works for 24 hours, thus not being stable in this.
The public Bearer auth in the Kitsu API works for everything else, just not modification.
Auth: 54d7307928f63414defd96399fc31ba847961ceaecef3a5fd93144e960c0e151
Response: