Hello I have some JS code below related to the API of an app we use at work.
I am trying to get the to numbers section below to return the input data in the screen shot. I have no idea how to write JS but any help or ideas to get this to be correct would be great.
In the actual JS code from the API docs I was returning this and on testing it worked.
"to_numbers": s"+15555555555"],
I can’t however figure out how to pull the input data
import requests
url = "https://dialpad.com/api/v2/sms"
payload = {
"infer_country_code": False,
"to_numbers": return {'phone': input_data p'phone']},
"text": "test message",
"user_id": sID NUMBER REMOVED BY MODERATOR]
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Bearer API KEY REMOVED BY MODERATOR]"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting.