Unable to determine the current character, it is not a string, number, array, or object

Hi All, i got this error when try to chaining token from response to header request

The current character read is 'Y' with an int value of 89
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
YTUxZGN2ODZiMGU5Zi1hZWQwLWMzNhMA........

My code

tokenGen().toString()

String tokenGen() {
def response1 = WS.sendRequest(findTestObject(‘sen/stagging cicd hashing/Token for signature GetToken’))

def jsonSlurper = new JsonSlurper()

def slurper = new JsonSlurper()

def result = slurper.parseText(response1.getResponseBodyContent())

def token = result.access_token

WS.verifyResponseStatusCode(response, 200)

println(token)

GlobalVariable.token = token}

Any help? please~ Thank you~

did you import ?
import com.kms.katalon.core.webservice.verification.WSResponseManager as WSResponseManager
import groovy.json.JsonSlurper as JsonSlurper

meanwhile let me try your code, will get back to you

@putra.wibisono just shifted your code with 1 addition try below also can you share the output of the request ?

tokenGen().toString()

def token = ''

String tokenGen() {
def response1 = WS.sendRequest(findTestObject(‘sen/stagging cicd hashing/Token for signature GetToken’))
WS.verifyResponseStatusCode(response, 200)

def jsonSlurper = new JsonSlurper()

def slurper = new JsonSlurper()

def result = slurper.parseText(response1.getResponseBodyContent())

def token = result.access_token

GlobalVariable.token = token

println(token)
}