Forum Discussion

BlakeTaylor1's avatar
BlakeTaylor1
Qrew Member
3 years ago

Quickbase REST Api in Quickbase Webhooks

Greetings, 

To start, I am aware that I could use QB Actions to solve this. Also, I tested all inside the Rest API documentation and was able to post a record successfully. 

I want to use QB Rest API inside QB Webhooks. I have two headers, the Authorization: "QB-USER-TOKEN [user token]" and QB-Realm-Hostname "thing.quickbase.com" filled out properly. The Endpoint is the generic https://api.quickbase.com/v1/records. Method: POST and FORMAT is JSON. 

Body : 
{
"to": "ImagineHere",
"data": [
{
"6": {
"value": "[Issue Type]"
},
"7": {
"value": "[Description]"
},
"8": {
"value": "Test Record"
}
}],

"fieldsToReturn": "3"

}


I keep getting 400 - bad requests with no description. If I could get some assistance I would be most appreciative. 

My intent is to manually create a record in table A and have the webhook insert into table B. If I can get this to work I can make it work cross apps, too. (Again, I know about the QB actions). Look at this as more practice than anything. 

Thank you in advance.

------------------------------
_____________
Blake Taylor
Quickbase Developer
------------------------------
  • For future use of anyone who happens across this issue, I found I couldn't have line breaks in the values the JSON was setting. Once I fixed that the web hook started working.

    ------------------------------
    Kurt Wagner
    ------------------------------