DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

How to make API call with JSON body - DNN v 09.01.01 (129) Action Form version 5.0.155

 9 Replies
 2 Subscribed to this topic
 37 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 6
New Around Here

I am using the Server Request action in an action form to make an API call which only accepts JSON format. But the Post Data field has the following

Put key=value pairs each on separate line. If a Content-Type is set to a json or xml type the data will pe parsed accordingly. Can contain tokens (for example [FirstName]) and My Tokens.

I tried to convert the JSON to key value pairs. It doesnt work. 

Thanks for any suggestions.

Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Hello!  It might be best to first upgrade your DNN site from 9.1.1.  That version is quite old.  It's using hundreds of deleted DNN API endpoints that you may have to fix later, and you're building and using a version of DNN which has known security bulletins.  Effectively, you're starting from a place of building a lot of technical debt.  

As for My Tokens, you may be better off trying to get support from that vendor.  While some people here do/have used that in the past, this is more of a DNN forum.  Each extension vendor tends to have a place to ask for support for their various respective extensions.  

New Around Here
Posts: 6
New Around Here
My question is not about My tokens. I just pasted what was on the Post Data field of the Server Request action. I tried to set the post data with a json body it didnt work. I tried with key value pairs as mentioned above. Nothing works. I thought that was a DNN question.
Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Oh, I guess I misunderstood that, but My Tokens and Action Form aren't DNN.  They're products of DNN Sharp which get installed into DNN.    

If this is a DNN question, I'm not sure what you're trying to do.  This seems like it could be a development question then.  If it is, can you provide more details about what you're doing and how you're doing it?  Is this in a module, library, theme, or in something else?  What kind of code is creating the server request and action? 🤔 

Advanced Member
Posts: 233
Advanced Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
Sujatha,
No disrespect but this is a question about “action forms” which is running on DNN. So you need to direct your question to DNN sharp. Start here. https://www.dnnsharp.com/helpcenter
New Around Here
Posts: 6
New Around Here

Oh so Action Form isnt DNN? Sorry I am totally new to this platform. I am just trying to build a form with a few fields and a button which when clicked will make an API call. The API only accepts json. The API call works perfect when I test from Postman but the same doesnt work from the action form action called Server Request. I dont know where to ask questions about Action Form or Action Grid. Do you have any suggestions? Thank you!

New Around Here
Posts: 6
New Around Here
Thanks Saw the other reply. WIll check the sharp forum.
Advanced Member
Posts: 233
Advanced Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
No problem, and welcome to the DNN community. Please feel free to come back if you still have questions that don’t get answered. Or any other DNN topics. Since you’re new to DNN, it’s sometimes difficult to know where to look. But we will do our best to get you an answer. 🙂






Advanced Member
Posts: 233
Advanced Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
PS. Echoing Will’s recommendation, you should be looking to update to a newer version. We realize now that you’re new to DNN, and still trying to figure things out, but if you really are on 9.1, that’s about 8 years old 😒
Your first step is to make sure you have a good dev/test environment.
Veteran Member
Posts: 838
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

Maybe nice to know: DNN Sharp upped their game about 7 years ago. Their modules (action grid, action form, my tokens but also scheduler and a workflow engine)  were integrated in a full force low code platform. Still running on DNN and a way to be much more productive regarding development. You can check it out on https://www.plantanapp.com/ 

For DNN context not cheap. Compared to Mendix or Outsystems really affordable.

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved