OpenCritic API

FREEMIUM
By OpenCritic | Updated 1ヶ月前 | Gaming
Popularity

9.8 / 10

Latency

229ms

Service Level

100%

Health Check

N/A

Back to All Discussions

"API Request failed due to Provider configuration error" from Apps Script

Rapid account: Supermonkey
supermonkey
2年前

Hi,

I keep a private Google Sheet which fetches OpenCritic scores for the games in my backlog using Apps Script. Today I started getting errors due to not having an API key, so I signed up here for a free key.

Everything seems to work fine from Curl, and I can repeat the same request a few times without ever encountering a failure.

$  curl --verbose 'https://opencritic-api.p.rapidapi.com/game/8168'   -H 'x-rapidapi-host: opencritic-api.p.rapidapi.com'   -H 'x-rapidapi-key: <redacted>'

However, when I try the same thing using a bit of Apps Script:

var url = 'https://opencritic-api.p.rapidapi.com/game/8168';
  var params = {
    'headers': {
      'x-rapidapi-host': 'opencritic-api.p.rapidapi.com',
      'x-rapidapi-key': '<redacted>',
    },
    'muteHttpExceptions': true
  };
  var response = UrlFetchApp.fetch(url, params);

I get one of two failures. About 50% of the time, I get an error, “You have exceeded the rate limit per second for your plan, BASIC, by the API provider”. (This is despite the above Curl command reporting x-ratelimit-requests-remaining: 198 in the response headers). The rest of the time, I get:

“API Request failed due to Provider configuration error: The API response body transformation failed to parse content-type application/json. Please contact the API Provider”,“info”: “Your Client (working) —> Gateway (working) —> API (not working)”

Given that it’s working from Curl, I’m not sure why this would be any different. I double checked the API key is identical in both systems. The error seems to indicate something wrong on the API side but I’m not sure what. Would someone be able to help here?

Thanks!

Rapid account: Supermonkey
supermonkey Commented 2年前

Confirmed - it is working fine for me now. Thanks!

Rapid account: Joekw 3
joekw3 Commented 2年前

I’ve spoken to OpenCritic and this should be fixed now.

Rapid account: Joekw 3
joekw3 Commented 2年前

I get the same error:

502 Bad Gateway
"message": “API Request failed due to Provider configuration error: The API response body transformation failed to parse content-type application/json. Please contact the API Provider”,
“info”: “Your Client (working) —> Gateway (working) —> API (not working)”

Join in the discussion - add comment below:

Login / Signup to post new comments