So you have two options - you can use an API token in your basic auth or alternatively, if you have ScriptRunner for Confluence Cloud installed then you don’t need to do anything, the authentication will be taken care of for you by ScriptRunner.
Also, you don’t need to use the new URL approach, you can use the provided get/put/post methods from Unirest like you have to obtain issue details.