Forum Discussion

AuroraHampton's avatar
AuroraHampton
Qrew Member
7 years ago

Getting Error Code 2 error text: ""Invalid Input"" and no error detail for API_addRecord

Hello,
I am attempting to use the QuickBase API to add a record to one of my databases.

I added a record through the API once, and only once, perfectly fine, but now, with the same code and parameters, I am getting an error with no details as to what is wrong.

All of my required fields are filled in - I know this because I took them away and I get an error code 50, Missing Required Field if I take one out.

My request looks as follows:

POST /db/db_id HTTP/1.1
Host: demo.quickbase.com:443
Content-Type: application/xml
QUICKBASE-ACTION: API_addRecord
Cache-Control: no-cache

<qdbapi>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<field fid='10'>First</field>
<field fid='11'>Last</field>
<field fid='13'>Test Data</field>
<field fid='15'>Test Data</field>
<field fid='17'>Test Data</field>
<field fid='18'>AK</field>
<field fid='19'>55555</field>
<field fid='20'>(555) 555-5555</field>
<field fid='22'>(555) 555-5555</field>
<field fid='23'>test@data.com</field>
</qdbapi>

and my response looks as follows:

<?xml version="1.0" ?>
<qdbapi>
    <action>API_addRecord</action>
    <errcode>2</errcode>
    <errtext>Invalid input</errtext>
</qdbapi>

Any help would be appreciated very much.
Thank you!
  • Hi, here is the below actual description of this error code.



    For details here, please go through the below link to learn more about error codes.

    https://help.quickbase.com/api-guide/errorcodes.html

    Dan had explained in below thread that how you can debug to find out where is the actual problem is.

    https://community.quickbase.com/quickbase/topics/addrecord-shows-errorcode-2-invalid-input

    Please let me know if you need any further information.

    Thanks,
    Gaurav
  • Hi there, Gaurav!

    I looked at that answer that you linked before I asked this question and nothing that Dan says in that post helped me, i.e. adding the record one field at a time - I would get error code 50 instead of 2 because I would be missing required fields. Which is great! But once all the required fields are there, then I get no information as to why I cannot add the record. 

    As for the error messages: it would be nice if the response said which one was the problem. If there is a way to get that detail, I would love to know.

    Thank you!
    • GauravSharma3's avatar
      GauravSharma3
      Qrew Commander
      I would suggest you check the Dbid and the field ids.

      Thanks,

      Gaurav