NotePage, Inc. Forum Index

PageGate and curl

 
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> PageGate Support
View previous topic :: View next topic  
Author Message
sclarke



Joined: 06 Jun 2018
Posts: 10
Location: United States

PostPosted: Wed Sep 19, 2018 3:54 pm    Post subject: PageGate and curl Reply with quote

I'm still working on our PageGate project (migrating away from physical machine and physical modems).

I have my server up and running on AWS (this is functioning fine). I've been doing tests with Web API.

Bandwidth has completely failed and will not function as documented in the PageGate tutorials. Clickatell has never returned my emails (I've sent several).

ZipWhip has been kind enough to work with me, but I find I'm still running into hiccups.

I'm trying to utilize the information here: https://www.notepage.net/videos/how-to-configure-an-http-post.htm

My API information, in curl format, is like this:

curl --request POST \
--url https://api.zipwhip.com/message/send \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'session=&contacts=&body='

Now if I do this from CLI in Linux or even something like Git Bash, everything works fine.

I'm trying to translate this into PG Admin in the Carriers section and I'm just banging my head against the keyboard.

I'm fairly certain that my mess is in the Text section of the Template under Carriers.

Any advice or "ah-ha" moments you can share with me?


Back to top
View user's profile
sclarke



Joined: 06 Jun 2018
Posts: 10
Location: United States

PostPosted: Wed Sep 19, 2018 3:58 pm    Post subject: Reply with quote

I'm assuming that it [i]could[/i] look something like this:

|session|unique session key|
|contacts|%Pin%|
|body|%Message%|

My challenge seems to be that ZipWhip API only seems valid for: cURL, jQuery, Ruby, Python Requests, Node, PHP, and Go.

The PageGate tutorial only mentions: XML, JSON, and Forms.

https://developers.zipwhip.com/#a072281d-803c-7ea3-d6e9-ec01bc420148


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Wed Sep 19, 2018 4:01 pm    Post subject: Reply with quote

Based on this line:
'Content-Type: application/x-www-form-urlencoded'

it looks like we'll need to declare the content type with this:

|Content-Type|application/x-www-form-urlencoded|

Try adding that to the template and let us know if it goes through, please.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sclarke



Joined: 06 Jun 2018
Posts: 10
Location: United States

PostPosted: Wed Sep 19, 2018 4:40 pm    Post subject: Reply with quote

I'm going over more variables:

My settings for the Carrier are:

Carrier: Random Name
Protocol: HTTPPOST
Host: https://api.zipwhip.com/message/send
Port: 443
Max Chars: 160

My Current Template is as follows:

|Content-Type|application/x-www-form-urlencoded|
|session|abcdefgh-ijkl-mnop-qrst-uvwxyzabcdef:123456789|
|contacts|%Pin%|
|body|%Message%|

*Note: that session string is a fake, just for the purpose of letting you see how it would look as far as syntax/layout.


I do a test message to my single recipient (my phone)

Monitoring PG Monitor on Connector1 - autoscroll I get the following:

http://foolarchy.com/smsr/2018-09-19_14h37_32.png


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Wed Sep 19, 2018 9:30 pm    Post subject: Reply with quote

Ah, you'll need to remove the https:// from the 'Host' field. When using port 443, PageGate assumes HTTPS and will use that prefix automatically.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sclarke



Joined: 06 Jun 2018
Posts: 10
Location: United States

PostPosted: Wed Sep 19, 2018 10:42 pm    Post subject: Reply with quote

Oh! That nailed it!

I finally got my first success. (on my virtual test environment).

Next is AWS hosting PageGate and using Web API via Zipwhip for the real test. If I remember, I'll post success. You can add it to your list of things that worked! :)

Thanks for the assist guys!


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Wed Sep 19, 2018 10:51 pm    Post subject: Reply with quote

Excellent! And definitely let us know, we're always happy to have better documentation for implemented solutions.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sclarke



Joined: 06 Jun 2018
Posts: 10
Location: United States

PostPosted: Thu Oct 18, 2018 3:41 pm    Post subject: Reply with quote

I'm back.

So the above mentioned bits was a simple test in a virtual environment.

I went back to my live functioning server and built the Carrier (as done in my virtual test environment) and married up the new Carrier to just two individuals. (I wanted to start with a very small controlled test on the live server).

I've been getting failures constantly. Not a single success. I can submit a partial log that might hopefully point me in the right direction? Or I can email an more complete log if that would help. (It has a sensitive information I'd rather not post).

Basically I'm looking for clues on where to start troubleshooting this:


[code]
9/21/2018 7:02:16 PM ----------------------------------------
9/21/2018 7:02:16 PM Working on message to: xxxx-xxxxxx from: xxxxxxxx@xxxxxx.xxx
9/21/2018 7:02:16 PM Formatting message
9/21/2018 7:02:16 PM Message contained in single packet
9/21/2018 7:02:16 PM Sending message to api.zipwhip.com:443/message/send
9/21/2018 7:02:16 PM POST Parameters:
9/21/2018 7:02:16 PM Content-Type=application/x-www-form-urlencoded
9/21/2018 7:02:16 PM session=xxxxxxxx-2f27-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxxx
9/21/2018 7:02:16 PM contacts=xxxxxxxxxx
9/21/2018 7:02:16 PM body=
9/21/2018 7:02:16 PM Received: <13><10>
9/21/2018 7:02:16 PM Message retry limit reached
9/21/2018 7:02:16 PM FAILED Stn:2 To:xxxx-xxxxx Frm:xxxxxxxx@xxxxxx.xxx Msg:7pm pager test. Please confirm your Staffing on Resgrid. [14]
9/21/2018 7:02:16 PM Carrier retry limit reached. Marking pending messages as bad
[/code]

Ideas? Or not enough data to even make a guess?


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 4351

PostPosted: Thu Oct 18, 2018 3:45 pm    Post subject: Reply with quote

If you would, send a screenshot of the following sections of PG Admin to support at notepage dot com:

Carriers - <Your curl carrier> - Settings
Carriers - <Your curl carrier> - Advanced
Carriers - <Your curl carrier> - Template

If you would, please also send the c:\PageGateData\Logs\*.log files from the server so we can take a look at a few things.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sclarke



Joined: 06 Jun 2018
Posts: 10
Location: United States

PostPosted: Tue Nov 13, 2018 8:36 pm    Post subject: Reply with quote

Sorry about the delay (again).

I wanted to report success with your latest assistance.

Updating my physical server to the very latest PageGate build (and that matched my virtual server) resolved all the httppost/httpget issues I was suffering.

Thanks again a whole bunch guys!


Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> PageGate Support All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
Theme created by Vjacheslav Trushkin