cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass authtoken dynamically from Post request's response to other post requests in ReadyAPITes

SOLVED
ramaG
Contributor

How to pass authtoken dynamically from Post request's response to other post requests in ReadyAPITes

Hello - 

Did anyone try passing authtoken dynamically from one request to other requests in ReadyAPI? First request is a Post request. Need to pass authtoken from this post request response to other Post requests. It seems Property transfer is not working.

 

Please let me know.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ramaG
Contributor

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

6 REPLIES 6
HimanshuTayal
Community Hero

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

@ramaG : Property transfer should work to transfer the auth code, could you please send any error screenshot

 

1 more thing you can do is write custom groovy code and add it either in new groovy Test Step or add it in script assertion.

 

Let me know if you need help in writing that stuff 🙂 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
nmrao
Community Hero

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

Have you extracted the token? If so, then save it custom property say TOKEN at test suite or project level so that it can be used across the project by referring as ${#Project#TOKEN} (if saved at project level) wherever you need it.


Regards,
Rao.
ramaG
Contributor

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

Thank you so much for the reply. This approach didn't work.

Tags (1)
nmrao
Community Hero

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

What steps have you done?
How are you sending token in the following requests? As a header?


Regards,
Rao.
ramaG
Contributor

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

nmrao
Community Hero

Re: How to pass authtoken dynamically from Post request's response to other post requests in ReadyAP

@ramaG 

I understand that you can't share the any details (may be because of your policies), but it is difficult to suggest any without knowing the details.

In such cases, you can still show with different property names and values but the same structure.

Glad to know my answer on stakcoverflow helped. If you look at question and answer, there is some code details are provided in the answer based on the user provided response in the question.

 

If you look at the above replies, the same was told except the coding part.



Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors