/* * Author: Bubba Li * Created Date: 01/25/2022 * Purpose: Utility class for AWS Servicw * Test Class: AWSServiceTool * History: * 01/25/2022 - Bubba Li - Initial Code. * * */ public without sharing class AWSServiceTool { public static String getAWSToken(){ String app_id = '6LzizcRf7h8yLx28'; String app_secret = 'UkLohQcHNjg164SdRc7gnS4rgu4d7FjINM3mtzRbyTS6IrUP5V'; String url = 'https://52.83.101.205/api/token/getToken?app_id=' + app_id + '&app_secret=' + app_secret; HttpRequest req = new HttpRequest(); req.setEndpoint(url); req.setMethod('GET'); Http h = new Http(); HttpResponse res = h.send(req); return res.getBody(); } }