How to get token or user info with token and refesh token with rest api?

how to get token or user info with token and refesh token with rest api ?

What token are you talking about? And what are you trying to do?

I want to connect nextcloud webdav with token not username and password