Bearer token for Custom login UI
Hi Team , I am trying to build a custom login UI in Zitadel (https://zitadel.com/docs/guides/integrate/login-ui/username-password).
Even though I passed all the mandatory fields correct as shown in the document I am getting a 401 unauthorised error with error being {"code":16,"message":"auth header missing"}
I haven't used any kind of bearer token , can anyone help me out on getting the bearer token and using it as a header for the custom login UI.
5 Replies
To be able to access the ZITADEL APIs you need a user with the correct rights, in case of building a login ui, it makes sense to have a servie user who does the requests
You can read about service users and how to authenticate them here: https://zitadel.com/docs/guides/integrate/service-users/authenticate-service-users
ZITADEL Docs
This guide explains ZITADEL service users and their role in facilitating secure machine-to-machine communication within your applications.
The easiest way to quickly get started and try out the requests, is with a personal access token (PAT) its a ready to use token
Just make sure, you also give the service user enough manager rights
Thanks! I've used a PAT and now I have my bearer token.
great