...
use Custom Fields for configurations - avoid hardcoding.
url, authentication data (clientID, client secrets, username, password, tokens, etc.)
pass parameters as a table
pcall() and Retry Library
If you are a more advanced user, refer to our Shell Adapter for how to structure your API client adapters.