Recent searches


No recent searches

Colin Bennett's Avatar

Colin Bennett

Joined Jan 20, 2022

·

Last activity Jan 24, 2022

Following

0

Followers

0

Total activity

5

Votes

0

Subscription

1

ACTIVITY OVERVIEW

Latest activity by Colin Bennett

Colin Bennett commented,

Community comment Developer - Zendesk Apps Framework (ZAF)

Hi Eric, Certainly, thank you.

View comment · Posted Jan 24, 2022 · Colin Bennett

0

Followers

0

Votes

0

Comments


Colin Bennett commented,

Community comment Developer - Zendesk Apps Framework (ZAF)

Hi,

1: I've tried with the secure setting in a param file and receive the same error.

2: I receive the error when testing locally, I received a 500 error when installed as a private app.

3: Noted regarding the content type, thank you.

 

 

View comment · Posted Jan 24, 2022 · Colin Bennett

0

Followers

0

Votes

0

Comments


Colin Bennett commented,

Community comment Developer - Zendesk Apps Framework (ZAF)

Hi, Please see below my Main.js and Iframe.html

Main.js

$(function() {
var client = ZAFClient.init();
client.invoke('resize', {
width: '100%',
height: '400px'
});
showForm();
$("#add-btn").click(function(event) {
event.preventDefault();
if ($("#subject").val().length < 0) {
client.invoke('notify', 'Subject can\'t be blank.', 'error');
} else {
var task = {
input_data: {
"request": {
subject: $("#subject").val(),
impact: $("#impact").val(),
Urgency: $("#urgency").val(),
subcategory: $("#subcategory").val(),
request_type: $("#request_type").val(),
mode: "zendesk"
}
}
};
sendTaskData(task, client);
}
});
});

function showForm() {
var source = $("#add_task-hdbs").html();
var template = Handlebars.compile(source);
var html = template();
$("#content").html(html);
}
var client = ZAFClient.init();
client.get('ticket.subject').then(function(subject) {
const sub = JSON.stringify(subject);
document.getElementById("subject").innerHTML = (sub.ticket.subject);
console.log(subject);
});

function sendTaskData(task, client) {
var settings = {
url: 'https://XXXX',
contentType: 'application/json;charset=utf-8',
headers: {
"Authorization": "Bearer XXXX",
"Accept": "application/vnd.manageengine.sdp.v3+json",
},
type: 'POST',
cors: false,
secure: true,
httpCompleteResponse: true,
data: JSON.stringify(task)
};
return client.request(settings).then((output) => {
const obj = JSON.parse(output);
document.getElementById("sdid").innerHTML = (obj.request.id);
console.log(output);
}).catch((error) => {
console.log("Error:", error);
});
}

Iframe.html




https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">












 

 

View comment · Posted Jan 21, 2022 · Colin Bennett

0

Followers

0

Votes

0

Comments


Colin Bennett created a post,

Post Developer - Zendesk Apps Framework (ZAF)

I have been guided here by Zendesk support, I am receiving the error Proxy error: {:code=>"UnprocessableEntity", :status=>"422", :title=>"Unprocessable Entity", :message=>"Failed to get installation and oauth information for app."} when I attempt to create a request to a 3rd party server, I have followed your extensive guide but still recieving the above.

Posted Jan 20, 2022 · Colin Bennett

2

Followers

15

Votes

26

Comments