最近搜索
没有最近搜索

Marcel Isaac
已加入2024年6月04日
·
最后活动2024年6月04日
关注
0
关注者
0
活动总数
1
投票
0
订阅
0
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 Marcel Isaac
Marcel Isaac 创建了一个帖子,
帖子 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?
已于 2024年6月04日 发布 · Marcel Isaac
0
关注者
2
投票
3
评论