Recent searches
No recent searches

Marcel Isaac
Joined Jun 04, 2024
·
Last activity Jun 04, 2024
Following
0
Followers
0
Total activity
1
Votes
0
Subscriptions
0
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Marcel Isaac
Marcel Isaac created a post,
Post 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?
Posted Jun 04, 2024 · Marcel Isaac
0
Followers
2
Votes
3
Comments