I am passing a token that I have received while using the logging API in Http Header Manager as "Authorization : Bearer 'the token that I received'" in Jmeter and then testing another API which needs that token. It's going fine when I am running the request for one thread(user). But as soon as I'm increasing the no. of threads to 2 or 3, I am not able to get a response as it says, "Tokens cannot be shared. Please create a new token". Is there any way where I can login for two users and get different tokens and then pass the respective tokens for those two users separately to perform different tasks. And can this process be automated as I am trying to test for multiple users? Thanks in advance.
My Test Plan Looks like this: Test Plan My Http Header Manager Looks Like this: enter image description here My Regular Expression Extractor Looks Like this: enter image description here
If I receive my token response like this { "token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwc2VuMSIsImV4cCI6MTUyNjYzMDA4MywiaXAiOiIxMjcuMC4wLjEifQ.k85RfQgOF2EiCzjVcmcRLgroHMCGb8P1a_Voi4mwzDEMQ3i2xUvNR6sHrHMO05k-b1MKsMBaxxuA-xiZe78_Xw" }
What should my regular expression be like? Am I following the procedures properly?