@NotWegant Forgive me for confusion. Actually, my problem is I want to buy OpenAI/ChatGPT number from 5sim.net service in "Phone Verification" module. Although I chose the site as OpenAI, it says "other" in the "$service" parameter in the api request. For example:
"http://api1.5sim.net/stubs/handler_api.php?api_key=--&action=getNumber&service=other&country=usa&ref=592310"
GET OPENAI response problem
-
Hi, I've been working on this for 2 days, I can connect to OpenAI but I can't get the final response in [[RISPOSTA_FINALE]]. Can you please help me?
// Invio della richiesta
var response = httpRequest("POST", "https://api.openai.com/v1/chat/completions", request, JSON.stringify(body));// Verifica la risposta
if (response.status == 200) {
var jsonResponse = JSON.parse(response.text);// Estrai il contenuto della risposta var responseResult = jsonResponse.choices[0].message.content; // Salva il risultato nella variabile di output SetVariable("RISPOSTA_FINALE", responseResult); // Logga la risposta per debug log(responseResult);} else {
// Gestione degli errori
log(Errore: ${response.status} - ${response.text});
}