API to add notes

API to add notes

I've got a php script that searches for records and it works fine. The key line is:
$records = $obj->getRecords( $token, 'Leads', $data['Email'] );
$record_id = $records->data[0]->id;

I'd like to add a note to the returned record. I'm using the native php sample code on https://www.zoho.com/crm/developer/docs/api/v2/get-notes.html and have modified the line to make use of token in play:
        $headersArray[] = "Authorization". ":" . "Zoho-oauthtoken " .$token->access_token;

The output is as follows and I'm not sure how to progress. Noting that this is a displayed result of:
        var_dump($headerMap);
        var_dump($jsonResponse);
        var_dump($responseInfo['http_code']);​

array(14) { ["Server"]=> string(3) "ZGS" ["Date"]=> string(29) "Tue, 04 Jan 2022 02:25:19 GMT" ["Content-Type"]=> string(30) "application/json;charset=utf-8" ["Content-Length"]=> string(2) "87" ["Connection"]=> string(10) "keep-alive" ["Set-Cookie"]=> string(90) "_zcsr_tmp=68a169e4-04d0-45e5-8e4f-4ccb4d46eb36;path=/;SameSite=Strict;Secure;priority=high" ["Referrer-Policy"]=> string(13) "strict-origin" ["X-Content-Type-Options"]=> string(7) "nosniff" ["X-XSS-Protection"]=> string(13) "1; mode=block" ["Pragma"]=> string(8) "no-cache" ["Cache-Control"]=> string(51) "private,no-cache,no-store,max-age=0,must-revalidate" ["Expires"]=> string(29) "Thu, 01 Jan 1970 00:00:00 GMT" ["X-Frame-Options"]=> string(10) "SAMEORIGIN" ["X-Download-Options"]=> string(6) "noopen" }

array(4) { ["code"]=> string(13) "INVALID_TOKEN" ["details"]=> array(0) { } ["message"]=> string(19) "invalid oauth token" ["status"]=> string(5) "error" }
int(401)