Skip to content

Commit 1108071

Browse files
committed
Fix templated PNP request per official reference
- body and body.emphasizedItem are optional (only to and templateKey are required), per the LINE notification messages API reference. - Remove the incorrect SHA256 pattern on to (the reference doesn't define one; aligns with the flexible PNP request). - Describe the 422 response for templated PNP push instead of the generic reason phrase.
1 parent 7ee94a2 commit 1108071

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎messaging-api.yml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,8 @@ paths:
17661766
"202":
17671767
description: "Accepted"
17681768
"422":
1769-
description: "Unprocessable Entity"
1769+
description: |+
1770+
Failed to send the LINE notification message. For example, there is no LINE user associated with the specified phone number, the phone number is outside the LINE notification message service area, the user has refused to receive LINE notification messages, or the user hasn't agreed to LINE's Privacy Policy.
17701771
content:
17711772
"application/json":
17721773
schema:
@@ -3718,12 +3719,10 @@ components:
37183719
required:
37193720
- to
37203721
- templateKey
3721-
- body
37223722
type: object
37233723
properties:
37243724
to:
37253725
type: string
3726-
pattern: "^[0-9a-zA-Z]{64}$"
37273726
description: "Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256."
37283727
templateKey:
37293728
type: string
@@ -3740,8 +3739,6 @@ components:
37403739
minLength: 1
37413740
pattern: "^[a-zA-Z0-9_]{1,30}$"
37423741
PnpTemplatedMessageBody:
3743-
required:
3744-
- emphasizedItem
37453742
type: object
37463743
description: "Content to be substituted into the template."
37473744
properties:

0 commit comments

Comments
 (0)