How to call third party access token API to call the main data API
We have requirement to call third party REST API to send data from PeopleSoft. Before sending the date we need to call the authentication API (Microsoft Azure) to get the access token. We need help how to call this. We have tried with below code but it's not working and we are getting error “Cannot establish HTTP connection (158,2842)”.
Local Message &MSG, &rMSG;
Local Document &doc;
Local Compound &com;
Local boolean &ret, &bRet, &result;
Local string &body, &grant_type, &client_id, &client_pwd, &jsonstring, &input_data;
Local any &return_msg;
&client_id = "xxxxxxxxxxxxxxxx";
&client_pwd = "xxxxxxxxxxxxxxxxxxxxxxx";
&grant_type = "client_credentials";
&Host = "login.microsoftonline.com";