Tafqit

부분 유료
분류별 postscripter | 업데이트됨 a month ago | Education
인기

9.2 / 10

지연 시간

292ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Error while using Google Sheet

Rapid account: Mhakmeh
mhakmeh
a year ago

Hi
I tried to use it inside my google sheet document but am getting this error

Exception: Request failed for https://tafqit.p.rapidapi.com returned code 400 (line 20).

and here is the code I wrote

function Taqfeet(input){
const encodedParams = {
“the_number”: input,
“unit”: " ريال سعودي",
“hundreds_form”: “مائة”
}

const options = {
method: ‘POST’,
headers: {
‘content-type’: ‘application/x-www-form-urlencoded’,
‘X-RapidAPI-Key’: 'here the key I got after subscriping,
‘X-RapidAPI-Host’: ‘tafqit.p.rapidapi.com
},
body: encodedParams
};

var response = UrlFetchApp.fetch(‘https://tafqit.p.rapidapi.com/convert’, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
}

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

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