How to call an API with oauth2 in script

How to call an API with oauth2 in script

Hello everyone,

I've a problem and can't figure it out and can't find it here or somewhere else on the internet.

I would like to call an external API that requires oauth2 authentication within a custom function in Zoho Creator.

How can I achieve this?
- Callback URL?
- Where to store the tokens, ...

Can somebody help me further plz?  Or is there somewhere an example that I can look into?

Kind regards,
Bert