Welcome Guest, Not a member yet? Register   Sign In
trying to get infor about a specific email
#1

(This post was last modified: 06-16-2021, 05:48 AM by richb201.)

I am trying to check an email address on the sendPulse mail list. I was given these two links on how to do it. 

https://github.com/sendpulse/sendpulse-rest-api-php

https://sendpulse.com/integrations/api/b...email-info



The second asks me to send a Get request to this email address:


https://api.sendpulse.com/emails/{email}

What CI function do I use to send that "get request"?
Reply
#2

If you quit coping and pasting you might get an answer no one is going to try and read that garbage.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(06-16-2021, 05:36 AM)InsiteFX Wrote: If you quit coping and pasting you might get an answer no one is going to try and read that garbage.

I am working on fixing that but got interrupted with a phone call. 
proof that an old dog can learn new tricks
Reply
#4

If you're using CI4 then you can use https://codeigniter.com/user_guide/libra...quest.html
Reply
#5

(06-16-2021, 07:11 AM)craig Wrote: If you're using CI4 then you can use https://codeigniter.com/user_guide/libra...quest.html
I am using CI3 at this point.
proof that an old dog can learn new tricks
Reply
#6

In that case I would either use the PHP library suggested or install an HTTP client package like Guzzle.
Reply
#7

(This post was last modified: 06-16-2021, 11:58 AM by richb201.)

(06-16-2021, 07:47 AM)craig Wrote: In that case I would either use the PHP library suggested or install an HTTP client package like Guzzle.

Thanks. I actually have GuZZLE already installed. Can you elaborate?
Actually after reviewing the code, that was commented out a while back. 
proof that an old dog can learn new tricks
Reply
#8

(06-16-2021, 07:20 AM)richb201 Wrote:
(06-16-2021, 07:11 AM)craig Wrote: If you're using CI4 then you can use https://codeigniter.com/user_guide/libra...quest.html
I am using CI3 at this point.

You can still use CURL with CI3. You just need to do all the work yourself (init, exec, close).
https://www.php.net/manual/en/book.curl
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#9

(This post was last modified: 06-22-2021, 01:40 PM by richb201.)

Thanks. I managed to get the "token" from the site by using Postman. Now I just need to figure out how to get the string that Postman created so I can paste it into my CURL statement.

Thanks all for your help. Only  by using postman was I able to play with the API for sendPulse. Finally go that working.
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB