Hello @dulith
Activities are executed in a different process than the workflow code (or in a different worker). When workflow code executes an activity, an activityTask is scheduled in the server and a worker (can be the same or another worker) will pick up the activity task and execute it.
You can pass the token from your workflow code to the activity as input (You can use data converters to encrypt the token if security concerns you)
Or you can use Context Propagator, see this example. sdk-java/ContextPropagationTest.java at master · temporalio/sdk-java · GitHub
Let me know if it helps,
Antonio