Hi !
I am creating an application for the User Stories management.
At the end of the process, I need to create an Issue in GitHub.
The authentification is working perfectly with Postman but I canot get it working with appsheet.
I have a retuerned error : Webhook HTTP request failed with exception The remote server returned an error: (403) Forbidden.
Wich means that the authorisation token is not passing well from appsheet to github:
{
"Exception": "Webhook HTTP request failed with exception The remote server returned an error: (403) Forbidden. ",
"Task Type": "Webhook",
"Task Name": "Task for Send githHub",
"Url": "https://api.github.com/repos/ADMINISTRATION/REPO/issues",
"Verb": "Post",
"MimeType": "application/json",
"Headers": "Authorization: Bearer <HERE IS THE TOKEN>, Content-Type: application/json",
"Payload": "{\"title\": \"titre\",\"body\":\"En tant que Product owner;\\nJe veux avoir quelque chose à faire;\\nAfin de faire quelque chose de ma vie.\",\"assignees\": [\"USER\"],\"labels\": [\"1\"]}"
}
POST /repos/ADMINISTRATION/REPO/issues HTTP/1.1
Host: api.github.com
Authorization: Bearer <HERE IS THE TOKEN>
Content-Type: application/json
Cookie: _octo=COOKIE; logged_in=no
Content-Length: 166
{
"title": "Test avec postman",
"body":"Ceci est un test postman",
"assignees": [
"USER"
],
"labels": [
"#4"
]
}
Solved! Go to Solution.
Hi,
I found a workaround using google script. Here it is :
function postIssue(url, token, user, title, body, label) {
const requestBody = {
"title": title,
"body":body,
"assignees": [
user
],
"labels": [
label
]
}
const requestPayload = JSON.stringify(requestBody);
const requestHeaders = {
"Content-Type": "application/json",
"Authorization": "Bearer " + token,
};
const request = {
"method": "POST",
"contentType": "application/json",
"headers": requestHeaders,
"payload": requestPayload
};
const response = UrlFetchApp.fetch(url, request);
const output = JSON.parse(response).id;
return output;
}
Can we get the Task screenshot instead of the "appsheet monitoring Task Properties"?
Hi,
I found a workaround using google script. Here it is :
function postIssue(url, token, user, title, body, label) {
const requestBody = {
"title": title,
"body":body,
"assignees": [
user
],
"labels": [
label
]
}
const requestPayload = JSON.stringify(requestBody);
const requestHeaders = {
"Content-Type": "application/json",
"Authorization": "Bearer " + token,
};
const request = {
"method": "POST",
"contentType": "application/json",
"headers": requestHeaders,
"payload": requestPayload
};
const response = UrlFetchApp.fetch(url, request);
const output = JSON.parse(response).id;
return output;
}
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |