Jump to content

Recommended Posts

Posted

I'm having ideas for a mod which implements the Mojang API, but needs to be authenticated. In order to make an user requests to the API, I need the access token. Creating an access token cancels out any existing ones, including the current user's session, effectively logging them. Is there any way to simply use the existing one generated on launcher startup? It should be in Minecraft somewhere, I just don't know where.

Posted
3 hours ago, diesieben07 said:

Minecraft::session.

Well, my fault for not looking long enough. That's what I'm looking for!

Probably don't know, but is the Session.getToken() an access token or a client token?

Posted
2 minutes ago, diesieben07 said:

It's the authentication token.

So... The access token? The access token is used directly with Mojang's API to change things like the skin, while the client token is used to gain access to the access token as well as basic user info.

Posted
4 minutes ago, diesieben07 said:

It's the access token, which is called authentication token in the code.

The client token is only used in the launcher to log you in.

Right, that's great then.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.