How to get OAuth2.0 token using API
I am using Pega DXAPI v2 api to create case and upload attachment. I have configured the OAuth2.0 authorization set up. My creat case and uploat attachment apis are working fine when we generate the OAuth2.0 token manually in postman. But now my requirement is ,rather than generating OAuth2.0 token manually how do I generate it using any OOTB API call? I would like to run my API collection from Tosca script where before calling my API OAuth2.0 token should be ready.
Do we have any OOTB API to generate the OAuth2.0 access token to use it runtime for further api calls?