-
Notifications
You must be signed in to change notification settings - Fork 102
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
[Feature] RefreshToken usage #565
Comments
Stale issue message |
There will be but I don't know what it is. The tokens don't expire for a long time (a year) so the lack of this isn't too impactful. |
@t0nyz0 I don't suppose you came across the REST api for using refreshTokens to regenerate an authToken later? |
@AdrianGarside Ah yes, almost forgot we need to refresh the token. I'll look into it. |
They currently last a year so it's not super urgent but it would be nice to gracefully handle extending it, but might be tricky to test. |
/v1/user-service/user/refreshtoken is the API although apparently it's behavior just changed so it no longer works when passed previously valid data. |
@AdrianGarside I took some vacation time but I'm glad you got things figured out. I burned a few hours today discovering that they require https://api.bambulab.com/v1/user-service/user/login for the initial login request instead of https://bambulab.com/api/sign-in/form. I should have been paying attention to your updates. I plan on working on the refreshToken code next unless you crack it first. |
Consider logging in through cloud then GET https://api.bambulab.com/v1/iot-service/api/user/bind and use that access code for local connection. For me it works and no refresh token is necessary |
The integration already supports connecting to the printer locally with an access code retrieved from the cloud APIs. That's fine if you only want to do so and can live with the limitations that has (Bambu blocks certain controls of the printer via local mqtt unless the printer is in full lan mode). But after a year when the authentication token expires you will lose some features because they are solely supported by the cloud APIs (e.g. custom filaments, print images, filament usage data) |
Describe the feature
Hi, I saw a refreshToken returned from the API /v1/user-service/user/login. Is there an API that can use refreshToken to refresh accessToken
What device is this for?
X1C
Other Information
No response
The text was updated successfully, but these errors were encountered: