Hi,
Following the blog: https://www.jmjcloud.com/blog/simplifying-apex_web_service-oauth2-client-credentials I am trying to make single call to fetch token and invoke a Rest API. I followed all the steps mentioned but always get "HTTP Status Code: 401" in response.
It works fine, if I change it to 2 steps process:
1. First to fetch token : apex_web_service.oauth_authenticate
2. Second to make Rest API call: apex_web_service.make_rest_request
Can anyone please help on how to avoid these 2 steps and do a single call so that token fetch/renew is managed internally.
I am using Apex version 19.2.
Thanks,
Deepali