Closed arimtiaz closed 4 months ago
Based on my experience with medusa, the admin panel does not use tokens. I'm guessing session something else, it was easier to just log in trough the browser, setup a panel and run tests from there, rather to figure out how it works.
@humbleEwan Nah I am not trying to het admin panel token. What i Did is extended medusa to adapt multi vendor functionality now I have to test it for that I need access token to send post and get methods
Then open the panel, go to settings, and select API key management option. Other than that I do not see any other way
That one doesnt work but there is this doc that they have but i couldn't understand it. Do you mind giving it a look.
It works fine.
Did you have to add anything on the postman authentication?
After I have the token I use it as a Bearer token
So when you first sent the post request to the auth/token you didnt need any tokens?
To get this JWT no. I only sent my email and password in the body. This is an authentication endpoint
Hey all, you can use both session and JWT-based authentication with both Medusa v1 and v2. We are planning to use JWTs for authentication by default in v2 (but both methods are supported for now).
The auth flow in v2 looks like this:
/auth/user/emailpass
to login/signup - This will return a JWT token on success/auth/session
with the JWT token, which will initiate a sessionMoreover, v2 will also support creating API keys that you can use for programatically calling the API.
For any additional discussions, please use Discord instead. thanks!
How can I generate access token?