How to get Ai content from Rytr via their API

Panther28

Elite Member
Executive VIP
Jr. VIP
Joined
May 2, 2010
Messages
9,949
Reaction score
16,067
I was trying for a while to get rytr product descriptions working, and finally after no help from support really, I stumbled upon the solution.

Thought it might help someone as new to API's as me.

The original documentation is here. With samples for php.

The part that starts:
Code:
  curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($c, CURLOPT_RETURNTRANSFER, true);

  $data = curl_exec($c);

Needs to be replaced with
Code:
//stays the same
curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);

//new
$certificate_location = 'C:\Program Files\PHP\extras\ssl\cacert.pem';
curl_setopt( $c, CURLOPT_CAINFO, $certificate_location );
curl_setopt( $c, CURLOPT_CAPATH, $certificate_location );

//new
curl_setopt($c, CURLOPT_VERBOSE, false);
curl_setopt($c, CURLOPT_HEADER, false);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, true);
    
//stays the same   
$data = curl_exec($c);

Support claimed that it works for them out of the box, but I found you need to make that local SSL location addition.
It didn't want to work when declaring the certificate check as false. So the certificate is defo required.

They also said if I couldn't figure it out, I should get a real PHP developer. So guess who's due a pay rise now!? :D

Big up to @TomTheCat for pointing me in the right direction, and helping me get started.
 
so this is after you have a subscription to their service?
then you do your own fiddling around? what's their customer service doing then? XD
 
so this is after you have a subscription to their service?
then you do your own fiddling around? what's their customer service doing then? XD
Yes, you still need a subscription. Yeah, they have a message in the dashboard that says any queries, please contact us. But as soon as you do they just give you the GitHub link and tell you it works for them.
 
Yes, you still need a subscription. Yeah, they have a message in the dashboard that says any queries, please contact us. But as soon as you do they just give you the GitHub link and tell you it works for them.
Nice. very customer centric behavior. ;) :eek:
 
Hello
I'm trying to integrate this API to a website
Do you recommend doing so ?
And can you please recommend me something to help as thier customer service is almost not available
I'm building the website using python and django
Thank you
 
Hello
I'm trying to integrate this API to a website
Do you recommend doing so ?
And can you please recommend me something to help as thier customer service is almost not available
I'm building the website using python and django
Thank you

No i wouldn't recommend rytr, as they wouldn't help me properly with a simple query of how to connect to their API with post. You are better of using open ai, or articleforge, those have better and easier api's to work with.

I'm just building a scraper in python django too, although I've got a few headaches, I've been using open ai, to help me code it up! :D

There are a couple of guides I've seen on the forum where people explain how to use the open API in python, so you should have a search for those. Good luck.
 
Back
Top