I need Help.... I do not find the error in this code but the result variable be undefined

Thanks, I had to use the await async function because I couldn’t do it any other way. Also I had to remove the use of the secret because I couldn’t implement it with the async function. It seems to me that what caused problems was precisely the promise of secrecy. but I’m not sure, because the function didn’t read the parameter, and the data was arriving fine… Removing the secret and using the async function works perfectly for me. Thanks… but I would like to know if it is possible to use the secret in this way. Greetings