OpenCritic API

FREEMIUM
Por OpenCritic | Atualizado 2 महीने पहले | Gaming
Popularidade

9.8 / 10

Latência

242ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

"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)”

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários