Skip to content
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

More of a suggestion/Question...... #2

Open
guydht opened this issue Aug 13, 2017 · 5 comments
Open

More of a suggestion/Question...... #2

guydht opened this issue Aug 13, 2017 · 5 comments

Comments

@guydht
Copy link

guydht commented Aug 13, 2017

When getting the authentication token for the user (which isn't written anywhere at the docs (anywhere that I looked at)) that you need for updating your list and stuff, Is it possible to also get that user's ID? As in, when I request "https://kitsu.io/api/oauth/token?grant_type=password&username=MYUSERNAME&password=MYPASSWORD"
it gives me the token but there's no way (that I know of....) of getting the ID for that same user (which is needed for updating the user's library). Of course you could just do another request to get the ID, but I think it should be obvious/implied that if someone wants a user's token he'd also want his ID.

@wopian
Copy link
Contributor

wopian commented Aug 13, 2017

Use the self filter: api/edge/users?filter[self]=true 👍

@guydht
Copy link
Author

guydht commented Aug 13, 2017

Yeah, I know that, but you need to do another request just for the ID...... What I'm saying is that the token request should also return the user's ID, or at least have an option to tell it to, to save the extra request, since most of the time if someone needs the token, he'll need the ID of that user.

@wopian
Copy link
Contributor

wopian commented Aug 13, 2017

That's currently not possible, as its not a standard property of oAuth2

Once proper oAuth2 with scopes and (actual) app-specific clientId is implemented soon, it could be an extra addition that gets injected into the returned response. E.g:

{
  "access_token":"036b9495-16d3-476e-b53a-ed5dfc7d6513",
  "expires_in":7199,
  "refresh_token":"811235f4-b39d-4626-b940-34399e7bc737",
  "token_type":"Bearer",
  "user_id":"2",
}

Although this is better suited at https://github.com/hummingbird-me/hummingbird

@guydht
Copy link
Author

guydht commented Aug 14, 2017

Okay, thanks for explaining..... I didn't post it on the main Kitsu page because I thought it's more of a back-end problem rather than a front-end, but I guess I'm wrong. Next time I'll write on that thread.

@Samanw
Copy link

Samanw commented Sep 10, 2017

Hi, is it possbile to get a anime myanimelist ID?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants