OpenCritic API

부분 유료
분류별 OpenCritic | 업데이트됨 2 месяца назад | Gaming
인기

9.8 / 10

지연 시간

243ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입