Creates agent's access token issue

M.abdallah
M.abdallah Posts: 16 🧑🏻‍🚀 - Cadet
edited June 5 in Spryker Development

I'm trying to generate a token for an agent user but it gives an exception

Undefined array key "customer_reference" during mapping customerIdentifier to RestUserTransfer

/agent-access-tokens

$customerIdentifier = $this->utilEncodingService->decodeJson(
    $oauthAccessTokenDataTransfer->getOauthUserId(),
    true,
); // this is the problem 

and this is my payload
{ "data": { "type": "agent-access-tokens", "attributes": { "username": "admin@spryker.com", "password": "change123" } }}