API usage -Synchornize Response

Hi All
we are using Camunda in our Project and i need to solve the following scenario:
a 3rd party company provide us with an API .One of the API methods returns an encrypted password.
i was able to develop simple process on Camunda with 1 task that use java Delegation and use the API to receive the password.

We use web application built on php and provide the user a form to request that password.

what i am trying to do:
the php need to call Camunda Process, and display the password back to the user.

i came with 2 options:
1.call process-instance/{ID}/Start with a unique key,java will store the password in some shared DB with the unique .php will attempt to read the db table with the unique key.in this case i need to query camunda if the process was finished, and then search the db.

2.another option is to Call a Task/create. Then call process-instance/{ID}/Start which will update the Task when it finish.Then call /Task/{id} and look for the value.

in both cases, the process is async- i need to call camunda few times .
my question: is there a way to call a task and receive a response in the same call?

thanks
Hana