How to pass Dynamic Infatoken In Http Get/Post request

Hi there, welcome to the forum :slight_smile:

It’s difficult for anyone to help you with this here, since there could be many different reasons why your backend is returning that error.

Some things to think about:

  • If you’re indeed getting the right token from the first request, since you mention it’s being logged correctly, then something else might be wrong with the authentication. Confirm that you’re making the request to the correct endpoint, and that all required headers are specified correctly.

  • If you have access to the backend service, enable debug logging that would help you troubleshoot why the request failed.

  • Enable --http-debug in k6, which will show you details of the request being made.

Hope this helps!

2 Likes