Vonage / vonage-node-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Apache License 2.0
374 stars 178 forks source link

fix: Change Numbers API to make URL Form Encoded requests #734

Closed dragonmantank closed 1 year ago

dragonmantank commented 1 year ago

Description

Changed the POST requests of the Numbers API to use URL form encoded requests instead of JSON bodies. Also forced the Numbers API to make sure the API Key and Secret are always in the header via the correct auth type.

Motivation and Context

Looks like this was a long-standing bug with the v3 code, and when everything was transitioned to using the server-client package it was moved to normal POST requests with a JSON body instead of using form encoded requests.

Testing Details

Unit tests, and used in a demo app

Example Output or Screenshots (if appropriate)

Types of changes

Checklist