최근 검색


최근 검색 없음

Agave's Avatar

Agave

가입한 날짜: 2023년 4월 19일

·

마지막 활동: 2023년 4월 19일

팔로잉

0

팔로워

0

총 활동 수

3

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 Agave

Agave님이 에 댓글을 입력함

커뮤니티 댓글 Developer - Zendesk APIs

Thank you so much for your help!  That explains a lot.  I was wondering if you could help me one more time.

So now I'm get Status Code: 500   Internal Server Error.  What might be causing this?  Do I need to use a different API token than what I was using for creating tickets?

var payload = new
            {
                lead = new
                {
                    first_name = firstName,
                    last_name = "LastName",
                    email = email,
                    organization_name = "",
                    tags = tags
                }
            };
// Convert the payload to JSON
         var jsonPayload = JsonConvert.SerializeObject(payload);


This is the JSON objetct:
{"lead":{"first_name":"Joe","last_name":"LastName","email":"test+zendesk28@gmail.com","organization_name":"","tags":["MyTag"]}}

Everything is the same as above, but the URL

var response = client.PostAsync("https://api.getbase.com/v2/leads",
                    new StringContent(jsonPayload, Encoding.UTF8, "application/json")).Result;

댓글 보기 · 2023년 4월 19일에 편집됨 · Agave

0

팔로워

0

투표 수

0

댓글


Agave님이 에 게시물을 만듦

게시물 Developer - Zendesk APIs

Hi, I'm trying to integrate the API and keep getting a 404.

The example domain URL I'm using is as follows (subdomain being our company subdomain with zendesk)

https://subdomain.zendesk.com/api/v2/leads.json

Here is an example of my C# code. 

var response = client.PostAsync("https://" + _subdomain + ".zendesk.com/api/v2/leads.json",
                    new StringContent(jsonPayload, Encoding.UTF8, "application/json")).Result;


NOTE: I am successfully authenticating when I create tickets

HttpClient client = new HttpClient();
           client.DefaultRequestHeaders.Authorization =
               new System.Net.Http.Headers.AuthenticationHeaderValue("Basic",
                   Convert.ToBase64String(Encoding.ASCII.GetBytes(_email + "/token:" + _apiToken)));

2023년 4월 19일에 편집됨 · Agave

0

팔로워

5

투표 수

3

댓글