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

Drasl API documentation #115

Open
xllifi opened this issue Nov 19, 2024 · 4 comments
Open

Drasl API documentation #115

xllifi opened this issue Nov 19, 2024 · 4 comments
Labels

Comments

@xllifi
Copy link

xllifi commented Nov 19, 2024

I'm making my own launcher and a system for creating accounts and authorizing.

For Mojang API re-implementations (e.g. authorizing) I can refer to wiki.vg, but Drasl seems to have its own API (<BaseURL>/drasl). I can read code and figure it out myself, but a proper documentation will be appreciated.

@evan-goode
Copy link
Member

There is a Drasl API for managing user accounts, but I'm planning to change a few things in #107 and bump the API to v2. There is a JSON OpenAPI specification at https://github.com/unmojang/drasl/blob/master/swagger.json that gets generated on each commit. You can view it at https://doc.drasl.unmojang.org. The docs are currently not very polished.

For authentication, you'll have to use the Mojang API, there is no Drasl-specific way to do that.

Curious, would #39 help your use case?

@xllifi
Copy link
Author

xllifi commented Nov 20, 2024

There is a Drasl API for managing user accounts, but I'm planning to change a few things in #107 and bump the API to v2. There is a JSON OpenAPI specification at https://github.com/unmojang/drasl/blob/master/swagger.json that gets generated on each commit. You can view it at https://doc.drasl.unmojang.org. The docs are currently not very polished.

Thanks! That's going to help.

For authentication, you'll have to use the Mojang API, there is no Drasl-specific way to do that.

Yeah, I figured. I didn't actually think I'm going to use Drasl API for authorization, bad wording from me.

Curious, would #39 help your use case?

Not for the project I'm working on right now (there's no SSO provider that I can use), but could be useful for other projects in future.

@evan-goode
Copy link
Member

Nice, I'll keep this issue open to remind myself to make the docs a little more user-friendly. Feel free to ask questions here or on https://matrix.to/#/!nntYkUIkaZiKmXZYne:matrix.org?via=matrix.org&via=envs.net&via=w33b.cloud.

  • Write example Python script demoing the Drasl API
  • Document how to authenticate to API with Bearer token

@evan-goode
Copy link
Member

Blocked by #107.

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

No branches or pull requests

2 participants