RFC Generator Mexico

GRATUIT
Par jfhe88 | Mise à jour 1ヶ月前 | Tools
Popularité

9.3 / 10

Latence

222ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

adding the api to google apps script

Rapid account: Tlamaki
tlamaki
1年前
hello, i'm having some troubles while adding the api to google's apps script, if i try with "message" i get a succesflu response, this is the code:

function rfch(ape1,ape2,nombre,fecha) {

rfc = encodeURI(rfc);
var response = UrlFetchApp.fetch(“https://jfhe88-rfc-generator-mexico.p.rapidapi.com/rest1/rfc/get?apellido_materno="+ape2+"&apellido_paterno="+ape1+"&fecha="+fecha+"&nombre="+nombre+"&solo_homoclave=0&rapidapi-key=KEY”);

if (String(response.getResponseCode())[0] === ‘4’){
return “”
}

var w = JSON.parse(response.getContentText());

return [ [w.response[“message”]] ]

}

But if i try to get the RFC field then i can’t get it to work, here is the code i’m using for rfc:
function rfch(ape1,ape2,nombre,fecha) {
rfc = encodeURI(rfc);
var response = UrlFetchApp.fetch(“https://jfhe88-rfc-generator-mexico.p.rapidapi.com/rest1/rfc/get?apellido_materno="+ape2+"&apellido_paterno="+ape1+"&fecha="+fecha+"&nombre="+nombre+"&solo_homoclave=0&rapidapi-key=KEY”);

if (String(response.getResponseCode())[0] === ‘4’){
return “”
}

var w = JSON.parse(response.getContentText());

return [ [w.response[“rfc”]] ]

}

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires