Passing token from the oauth2 node to http request using function node

Hello,
I have been trying to pass the bearer token generated using oauth2 token into the http request node (use authentication is selected, type - bearer authentication, and the token is to be taken from the oauth2 node. There seems to be something wrong with the script in function node, I would really appreciate if someone could correct that.
The idea was to create a tokenId variable and input it into the property (Token) of the next node. image