Turning a URL call into a API POST

Hello All… I use quickchart.io to make all charts in my app. Currently some of the URL’s are getting crazy long and are impossible to send and have someone use. I am trying to use their API URL shortener but running into issues.

When i kept the charts simple, like this

i was able to do this, no problem.

now i am trying to do this

and running into problems. What i dont understand is, am i doing this wrong? Is it because i have a callback function at the very end, perhaps this is incorrectly put into the scheme of things? IDK. what i do know is that this is the code i want to recreate

  type: 'line',
  data: {
    labels: ['January', 'February', 'March', 'April', 'May'],
    datasets: [
      	label: 'Corrects',
      	data: [ 10, 60, 70, 180, 190 ], borderWidth:1,pointBackground:'green',
	fill: false,
    	  label: 'Incorrects',
     	 data: [ .10, 20, 30, 40, 50 ], 
	fill: false, 
	borderColor: 'red', pointStyle:'star', pointRadius:4, borderWidth:1
  options: {
    	title: {
     	 display: true,
      	fontColor: 'Black',
      	fontSize: 32,
    	legend: {
      	position: 'bottom',
    	scales: {
      	yAxes: [{ type: 'logarithmic', 
        	ticks: {
        	autoSkip: false,
        	min:.001, max: 1000,callback: function (value, index, values) {if( value==.001 || value==.01 || value==.1 || value==1 || value==10 || value==100 || value==1000){return value + ' per minute';}},}}],},},}```

side note, the code above does create a chart, so it's valid. I just dont think i am building it into the blocks correctly. When i use this code plus the URL starter as the scr for image's it works perfectly.

And solved… sometimes i need to read my own notes.
instead of putting the entire thing into blocks, i took what i normally include into the url into the text block and connected it into the chart field block


Hi Jared,

On the same lines, i have been trying to create a POST API but having a hard time in identifying the header and body params. I know the code that i am trying to recreate, so any help will be appreciated. Below is the code i am trying to create. Also at the following link . Which language code do i use? Curl, Java, Node, PHP or Python?


So for the header I need tokentype and signature (checksum string)?
For the body i need mid, linkName, linkDescription, linktype

The blocks i have are below. I know they are not complete, but i am stuck. Any help is appreciated as always.

Can you copy/paste that whole code for the curl?

Thanks for your attention. Here is the code for CURL

curl -X POST ‘https://securegw-stage.paytm.in/link/create
–header ‘Content-Type: application/json’
–data ‘{“body”:{“mid”:"{mid}",“linkType”:"{link-type}",“linkDescription”:"{link-description}",“linkName”:"{link-name}"},“head”:{“tokenType”:“AES”,“signature”:"{signature}"}}’

it would look like this

but it’s missing multiple pieces of info. each empy slot should be filled in with values related to the parameters. the example does not hold any true values except for ‘AES’

1 Like

Great - Thanks! I understand now how to create the body. I have all the values except for the signature. This is tricky - what the website says that they use the checksum facility. The website says this about the signature

"Signature encryption for validation. It’s value to be sent should be the checksum string created by using https://developer.paytm.com/docs/checksum

if i go to this link i see . Which checksum utility should i download? I have the account secret Key. What is compatible with Thunkable? Thanks a lot!