웹훅 엔드포인트 등록
curl --request POST \
--url https://meterengine.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_types": [],
"url": "<string>",
"description": "<string>"
}
'const url = 'https://meterengine.com/v1/webhook-endpoints';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_types: [], url: '<string>', description: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"enabled": true,
"event_types": [
"<string>"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_attempt_failed": true,
"secret": "<string>",
"url": "<string>"
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}웹훅
웹훅 엔드포인트 등록
서명 비밀값은 이 응답에서만 한 번 돌려준다. 등록 한도는 도입사의 환경마다 10개다. 운영에서는 HTTPS와 공개 주소만 허용한다.
POST
/
v1
/
webhook-endpoints
웹훅 엔드포인트 등록
curl --request POST \
--url https://meterengine.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_types": [],
"url": "<string>",
"description": "<string>"
}
'const url = 'https://meterengine.com/v1/webhook-endpoints';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_types: [], url: '<string>', description: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"archived_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"enabled": true,
"event_types": [
"<string>"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_attempt_failed": true,
"secret": "<string>",
"url": "<string>"
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
본문
application/json