Recherches récentes
Pas de recherche récente

Marcel Isaac
Adhésion le 04 juin 2024
·
Dernière activité le 04 juin 2024
Suivis
0
Abonnés
0
Activité totale
1
Votes
0
Abonnements
0
APERÇU DES ACTIVITÉS
BADGES
ARTICLES
PUBLICATIONS
COMMENTAIRES DE LA COMMUNAUTÉ
COMMENTAIRES SUR L’ARTICLE
APERÇU DES ACTIVITÉS
Dernière activité effectuée par Marcel Isaac
Marcel Isaac a créé une publication,
Publication Developer - Zendesk APIs
When I try to make any simple request from my system to the Sell API I get 500 error
Here's my code on python:
import http.client
conn = http.client.HTTPSConnection("api.getbase.com")
payload = ""
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'Authorization': "Bearer *************"
}
conn.request("GET", "/v2/deal/custom_fields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Here's my code on PHP
$ch = curl_init();
$url = "https://api.getbase.com/v2/deal/custom_fields";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer **********'
]);
$response = curl_exec($ch);
curl_close($ch);
Here's my code on JS:
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
Authorization: 'Bearer ***************'
}
};
fetch('https://api.getbase.com/v2/deal/custom_fields', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
All of the above returns this
500 Internal Server Error
500 Internal Server Error
nginx
that's not an error from my server.
however, the code works good in postman. What I am missing?
Publication le 04 juin 2024 · Marcel Isaac
0
Abonnés
2
Votes
3
Commentaires