APIを利用して、メッセージの送信結果を取得する方法
メッセージの送信結果を取得します。
GET /v2/messages/:identifier
エラー定義 参照。
ステータスコード 200 OK と以下のプロパティを含む JSON オブジェクトを返します。
{
"provider": "line",
"result": {
"status": "success"
}
}
{
"provider": "line",
"result": {
"status": "reserved"
}
}
{
"provider": "line",
"result": {
"status": "processing"
}
}
{
"provider": "line",
"result": {
"status": "failed",
"error": {
"code": 0,
"message": "Failed to send message."
}
}
}
{
"provider": "line",
"result": {
"status": "failed",
"error": {
"code": 1,
"message": "Provider server error.",
"from_provider": {
"message": "Authentication failed due to the following reason: accessToken expired(2). Confirm that the access token in the authorization header is valid."
}
}
}
}
上記の from_provider.message にはプロバイダーから返されたエラーメッセージをそのまま含みます。詳細はプロバイダー(LINE)のエラーレスポンス仕様をご確認ください。
curl -L -X GET https://msgapi.socialplus.jp/v2/messages/{identifier} \
-H 'Accept: application/json' \
-H 'X-API-Key: {API Key}'
ソーシャルPLUSに関するお問い合わせやご相談など、お気軽にお問い合わせください。