最近の検索
最近の検索はありません

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
コメント