API UPDATE - API Internal and Vendor Audits, API Q1 and Q2 ...
CallFire API
-
Upload
regan-buchanan -
Category
Documents
-
view
25 -
download
0
description
Transcript of CallFire API
![Page 1: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/1.jpg)
CallFire APIIntroduction
![Page 2: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/2.jpg)
Outline
• Overview
• Generating API credentials
• 7 Services
• CallFire API information
• REST API
• REST Example SendText
• SOAP API
• SOAP Example SendText PHP
![Page 3: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/3.jpg)
Overview
• 7 services: broadcast, subscription, text, call, contact, number, and label.
• Need separate API credentials (see Add API Access). Callfire username and password won’t work.
• REST and SOAP APIs functionally equivalent since they use same underlying services.
• REST documentation includes ability to execute operations in browser using “Try me!” button.
• REST supports both JSON and XML encoding.
• SOAP documentation includes PHP code examples.
![Page 4: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/4.jpg)
API Credentials
• API credentials are NOT the same as website credentials. Different username and password.
• Create API credentials on www.callfire.com/ui/manage/access
• See following slides for screen shots.
• Select “Settings” view.
• Select “API Access” tab in “Settings” view.
• Press “Add API Access” and fill in form.
• Remember to write down password.
![Page 5: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/5.jpg)
![Page 6: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/6.jpg)
![Page 7: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/7.jpg)
Browser API Credentials Request
![Page 8: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/8.jpg)
7 Serviceshttp://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl
• Broadcast - Creating and managing outbound call and texts.
– Prefer Text or Call service for simple cases.
• Subscription - Creating and managing subscriptions (callback notifications), which listen for account events.
• Text - Sending and receiving text messages and managing auto-replies.
• Call - Sending calls, viewing their results, and managing sound files.
• Contact - Manage contact lists.
• Number - Buying and configuring numbers and keywords.
• Label - Labeling and querying objects by label.
![Page 9: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/9.jpg)
CallFire API Documentationhttp://www.callfire.com/api-documentation
![Page 10: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/10.jpg)
REST Documentation
• https://www.callfire.com/api-documentation/rest/version/1.1
• Execute REST API calls through documentation page.– “Try Me!” button on bottom.– Browser will request API credentials.
• XML encoding by default. Use JSON encoding by appending .json to resource uri (.../rest/text.json).
• Side panel offers SOAP service names to show operation mapping (SendText -> POST /text).
• Form encoding for POST (see POST /contact/list).
![Page 11: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/11.jpg)
![Page 12: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/12.jpg)
SendText REST Example
• Goto POST /text REST documentation.– https://www.callfire.com/api-documentation/rest/version/1.1#!/text/SendText_post_0
• Mandatory parameters - Type, To, and Message.
• Fill in parameters - Type = ‘Text’, To = ‘1310… 1213….’, Message = ‘Test sending SMS message’.
• Hit “Try it out!” at bottom.
• Returned XML is a ‘ResourceReference’ which includes ‘Id’ (BroadcastId) and ‘Location’ (resource uri) to retrieve referenced broadcast from.
![Page 13: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/13.jpg)
![Page 14: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/14.jpg)
![Page 15: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/15.jpg)
SOAP Documentation
• www.callfire.com/api-documentation/version/1.1
• WSDL - www.callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl
• PHP examples provided for each SOAP call.– www.callfire.com/api-documentation/version/1.1/TextService/SendText
• PHP Soap SDK with more complex examples.
– github.com/CallFire/CallFire-PHP-SDK
![Page 16: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/16.jpg)
SendText SOAP PHP Example
• Find SendText in SOAP documentation.– www.callfire.com/api-documentation/version/1.1/TextService/SendText
• Mandatory parameters - ToNumber and Message.
• Copy PHP code in documentation to .php file.
– First SendText creates new broadcast.
– Second SendText uses existing broadcast.
• Execute using ‘php <filename>.php’.
• Should echo ‘broadcastId: <new broadcastId>’
• Should receive text message on ToNumbers.
![Page 17: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/17.jpg)
![Page 18: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/18.jpg)
![Page 19: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/19.jpg)
![Page 20: CallFire API](https://reader036.fdocuments.us/reader036/viewer/2022070400/568130c5550346895d96e4fe/html5/thumbnails/20.jpg)
Next Steps
• Webinar “Managing a Text Campaign”.– Get results.– Set up notifications with Subscription API.– Manage contacts.