Customer Self-Service Portal

API Sequence to login then use response as value in another message

To give some background, we have an API where one will need to login, then a token is recieved which to be used when posting for the operation. What I cannot find is if theres a way to Login, take response parse out the token and use it in the next message post. Is this possible? If so, any ideas as to how I can set this up? I have tried the Web App recorder and havn't figured it out. Please let me know. Thanks!