Getting User in custom authenticator when the user used token in URL


I’m trying to create a user and single user server using API on demand. So our end users will just use server URI with token without going through built-in login page. They can open Notebook UI in browser but it didn’t connect to kernel. In fact, /authorize and /login returned 403. I wrote custom authenticator to fix it but apparently either handler or data in authenticate function does not contain the token so I can’t write any authentication logic there.
All other http requests has the token in Authorization header but the two requests completely missed Authorization header and query strings do not have any information. Is there any way for me to make them still have the token from original URL?
Does code in query string contain such information somehow?


It’s difficult to know exactly what you want to do without seeing your code, but it sounds like the documentation on JupyterHub services:

and the example of a service obtaining user information:

should be useful.