Pesquisas recentes
Sem pesquisas recentes

Colin Bennett
Entrou em 20 de jan. de 2022
·
Última atividade em 24 de jan. de 2022
Seguindo
0
Seguidores
0
Atividade total
5
Votos
0
Assinatura
1
VISÃO GERAL DA ATIVIDADE
MEDALHAS
ARTIGOS
PUBLICAÇÕES
COMENTÁRIOS NA COMUNIDADE
COMENTÁRIOS EM ARTIGOS
VISÃO GERAL DA ATIVIDADE
Atividade mais recente por Colin Bennett
Colin Bennett comentou,
Hi Eric, Certainly, thank you.
Exibir comentário · Publicado 24 de jan. de 2022 · Colin Bennett
0
Seguidores
0
Votos
0
Comentários
Colin Bennett comentou,
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.
Exibir comentário · Publicado 24 de jan. de 2022 · Colin Bennett
0
Seguidores
0
Votos
0
Comentários
Colin Bennett comentou,
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">
Exibir comentário · Publicado 21 de jan. de 2022 · Colin Bennett
0
Seguidores
0
Votos
0
Comentários
Colin Bennett criou uma publicação,
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.
Publicado 20 de jan. de 2022 · Colin Bennett
2
Seguidores
15
Votos
26
Comentários