Retrieve internal Task Id from External Task


I’m trying to make a REST call to this endpoint, while executing my fetched external task But when I enter the ID I received from org.camunda.bpm.client.task.ExternalTask#getId() or org.camunda.bpm.client.task.ExternalTask#getActivityInstanceId() the Engine throws this exception:

org.camunda.bpm.engine.exception.NullValueException: task c20429a7-475b-11ea-92b9-00ff29e821a6 doesn't exist: task is null

How am I supposed to refer to my task from outside?