Can Execute Javascript Get Values from API request

Im am trying to get the token coming from a request using Execute javascript, I am not sure if this is possible using that Keyword.
See code below:

when looking at the report, it did not return an error but did not return any value.

is there a way to extract the value of that JS snippet using robot framework?

I could be wrong but this should just be:

${token}=    SeleniumLibrary.Execute Javascript      window.gapi.......

And then you have your token stored in ${token} provided that is what is returned.

hi Wolfe1,

thank you for the suggestion, did that already before posting this question, sadly it did not return any values.

I think there should be return statement in the JavaScript so that it would give the value back.

Do you have any idea how should i do that? not really sure on where the return should be put. Thanks!