Generic Web Connection

I am using the Generic Web Data Connector for a rest api connection. The connection I am making has an expiring Bearer Auth token. Has anyone used the generic web connector to make a call to an API with an authorization token that needed to be consistently refreshed and inserted into the secret? I am having trouble finding code online that I can convert into the script language needed. Thank you for any help you can provide.