I’m working on an application that uses the API for some operations, and I’ve been able to get along with using my PAT just fine, but the token is very short-lived, and I’d like to obtain the token programatically rather than through the UI. I use Google as my Identity provider, and the docs suggest passing in the UUID for this provider for the redirection: Mender API docs
How to I obtain the UUID needed to get this to work?
Sorry, I can’t properly follow. The PATs are definitely not short-lived, and meant exactly for that use case. Is your application distributed or scaling out over so many devices that it needs to be automatically created?
That’s what I saw in the Docs, but the only token I have under “My Profile” is my session token, which expires when the page times out. I can use that easily enough for testing things out for a few minutes, but it won’t work for my application.
I’m building a UI for use internally, and ideally users would still use their own profile (signing in via Google) for making these calls.
The paragraph following Session token is called Personal access token management, and allows you to create a number of long-lived tokens for exactly the use case that you described. If it is not there, then chances are that you are running an outdated version of the backend.
Sorry, I was busy travelling last week. Yes, this indeed the feedback that I got from the developers. PATs are not available for SSO-based accounts. The workaround would be to add a username/password based user to your account (you can do so under User Management), and that one can have PATs then.
I attempted to do that with my existing email, but it looks like I can’t register the same email twice. Also, my organization has SSO enabled company-wide, so for users to be able to access this application we will need this functionality. Is there a plan for this to be implemented?
I’m not aware of any change plans here. If your SSO provider is Google, then a simple trick would be to add a +something suffix. Like my.name+menderapi@gmail.com, which will be delivered to your standard inbox.