You say you need to make a call to a URL to get your bearer token? May be you can use a beforeOperationRule in your custom authentication call and get bearer token and use it for subsequent calls.
If you have a token endpoint (URL for generating the access token), along with the Client ID and Client Secret, you can configure the Web Services connector to use OAuth as the Authentication Method. Provide the required OAuth details in the authentication configuration section.
Once the token is retrieved, if you need to pass the Bearer token manually to a specific HTTP operation (such as GET or POST), you can include it in the HTTP Headers section by adding: Authorization key
You can create an operation Custom Authentication in your Webservices application. Put your configuration for getting token from token URL in this operation, something like this
Now this attribute at can be used in all other operations where you want this to be used. Whenever you do any operation like Create Account, Account aggregation etc, IIQ calls this API automatically to retrieve access token and stores in attribute application.at. You can refer this configuration as example-