(edited by Grax.9204)
ErrBadParam in google spreadsheets
You might have to set the headers correctly to fetch the data.
var options = { };
options[“method”] = “GET”;
options[“contentType”] = “application/json”;
var response = UrlFetchApp.fetch(url, options);
Not sure if this will solve your issue, worth a shot.
Thanks for the tip.
Here’s what I tried:
var apiKey = "9EBFF0A1-988B-9C41-8E52-DFE622E774967324E1F7-AAA2-4837-974A-B42B312263B6";
var url = 'https://api.guildwars2.com/v2/account/bank?access_token=' + apiKey;
var options = {
"method": "GET",
"contentType": "application/json",
"muteHttpExceptions": true
};
var response = UrlFetchApp.fetch(url, options);
Same result, the response I get is “ErrBadParam”.
Your issue is something specific in the Google Apps script, rather than the URL; since you supplied the API key I was able to verify that it works, and returns data, manually.
Have you tried dumping the body of the response object, which may contain more details? Anyway, ultimately, this is a “local code” issue, not an API issue. Sorry.