• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

MainWP API not getting JSON

FilioTech

Member
Hi all,
Recently, I was trying to connect to MainWP Dashboard via API https://mainwp.dev/rest-api/ but for some reason Pabbly is not detecting output as JSON. Doesn't mater if de-select Simple Response, it always showing them as fields. I also tried adding header Content-Type: JSON but nothing.

However, after speaking with Fagun, who kindly asked me to check and was trying to help, I tested with postman.com and output as as JSON so it works okay.

There was similar questions asked on Facebook https://www.facebook.com/groups/193632914749672/search/?q=mainwp but without any answers.

I tried with Manoj Lk Private App but also setup my own API connection to check. And it doesn't matter what I do or click, it never outputs as JSON.

The reason for JSON output is as we want to grab all of the sites, and add them into another system.

Any help is much appreciated.
 
P

Pabblymember11

Guest
Hey @FilioTech

Seems like the API response that you are getting might not be in the key-value pair and because of that, the action step is not taking the response in advance format.

Further, the MainWP application wasn't integrated by the Pabbly team, so kindly contact the user who has shared the application with you.
 

FilioTech

Member
Hi, sorry for the delay! For some reason, not getting email notification upon reply!
This has nothing to do with person creating private integration with MainWP on Pabbly

What I don't understand is, when you follow the exact steps on postman, connection, etc. I am getting JSON output, but with Pabbly output is row based. I've tested as well with my own API setup, always row based.
What you could suggest I should try?
 
P

Pabblymember11

Guest
Hey @FilioTech

If you want to capture the API response in the advanced format in JSON array, you need to toggle the "Simple Response" button and then press the "Save & Send Test Request" or "Re-Capture Webhook Response" from the action step & trigger event accordingly.

1667805861634.png
 
P

Pabblymember11

Guest
Hey @FilioTech

We only capture the response as the API sends the data in their format. If they pass the data in JSON format we would have captured it in the array format.
 

FilioTech

Member
Any other reason why it would not be captured in array format? Somehow postman receive data in JSON but cannot get this in Pabbly?
 
P

Pabblymember11

Guest
Our tech team is checking on it and shall notify you with an update soon.
 

Neeraj

Administrator
Staff member
@FilioTech shared the solution with me. I am adding the same here for someone else facing the same issue.

By default, MainWP does not send the Array in the JSON so the users cannot use Iterator on the items.

Instead, if you do the full call with format=array and full_data=true. The array will be maintained and the iterator can be run on the incoming data which will be an array.

The full API request would look like this yourdashboard.com/wp-json/mainwp/v1/sites/all-sites?consumer_key=ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&consumer_secret=cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&format=array&full_data=true
 

Salem

Member
Please my save and send test button isnt working, help
 

Attachments

  • 1672441462936.png
    1672441462936.png
    295.9 KB · Views: 94
P

Pabblymember11

Guest
Hey @Salem

Could you please share your workflow with us in which you are facing the issue so that we can look into it and can guide you accordingly?
 
P

Pabblymember11

Guest
Hey @Salem

Could you please try clearing your browser's cache memory once and then try again?

As we couldn't find any issue while using the "Save & Send Test Request" button.
 

Salem

Member
Please kindly go through this video, thank you and Happy New Year

Hey @Salem

Could you please try clearing your browser's cache memory once and then try again?

As we couldn't find any issue while using the "Save & Send Test Request" button.

Hey @Salem

Could you please try clearing your browser's cache memory once and then try again?

As we couldn't find any issue while using the "Save & Send Test Request" button.
 
P

Pabblymember11

Guest
Hey @Salem

We couldn't see your video URLs in your reply. Since its length is way too long and it's not even opening.
 
Top