I'm trying to run a CloudScript from a PlayStream event which will call a Steam WebAPI request.
The Steam WebAPI documentation says to use x-www-form-urlencoded for the Content-Type.
I've tried a couple different ways to pass the data into the content of the http.request, but the response keeps coming back saying "Required parameter 'key' is missing"
Is there some other way I need to pass the content to the http.request other than the two methods I've tried below?
(I use the proper key and appid in my Cloudscript, just didn't want to post those publicly)
handlers.CheckEarlyAccessOwner = function (args, context) { var steamid = context.playStreamEvent.PlatformUserId; var headers = {}; var body = "?key=XXXXXXXXXXXXXXXXXXXXXXXXXX" + "&steamid=" + steamid + "&appid=YYYYYY"; log.debug("Body: " + body); //var body = { // key: XXXXXXXXXXXXXXXXXXXXXXXXXX, // steamid: steamid, // appid: YYYYYY //}; var url = "https://partner.steam-api.com/ISteamUser/CheckAppOwnership/v2/"; var content = body; //var content = JSON.stringify(body); var httpMethod = "get"; var contentType = "application/x-www-form-urlencoded; charset=UTF-8"; // The pre-defined http object makes synchronous HTTP requests var response = http.request(url, httpMethod, content, contentType, headers); log.debug(response.timestamp); return { responseContent: response }; }