Tafqit

GRATIS CON POSSIBILITÀ DI UPGRADE
Da postscripter | Aggiornamento il y a un mois | Education
Popolarità

9.2 / 10

Latenza

289ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

Error while using Google Sheet

Rapid account: Mhakmeh
mhakmeh
il y a un an

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));
}

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti