so i turned my head around for 2 days to find a solution to use PowerAutomate with refreshed access tokens and i figured out a solution, but unfourtunetly without Custom Connector:
So my scenario is that i need to generate a new acces token with the refresh token that i generated at authorization. Each time i want to create a call i use the refresh token to get new access token, then i parse and use it in the next http call in powerautomate.
1. Authorize your API with any browser (chrome, edge...etc) (Read oauth2 Authorization documentation from your app)
2. Generate Access token and Refresh token using API Documentation and using Postman. (Read oauth2 Generate tokens documentation from your app) *this is your first token that expires in x minutes.
3. Create new flow in power automate starting with any trigger you like.
4. Add HTTP Step and select POST and paste in your URI that gives you the new access token. The refresh token generates the new access token. Refresh token you get from step 2 with Postman. (Read oauth2 Refreshing tokens documentation from your app)
5. Parse json response.
6. Add HTTP step and use new Acces Token from step.5
Each time you have a trigger all 3 steps are mandatory to receive fresh access token.
Done, you can call any API always having the refreshed access token.