Help forum

'Get Rows' API error

  • Hausia

    1 year ago

    Hi, getting this error from the attached API call.

    "<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>SyntaxError: Unexpected token &quot; in JSON at position 0<br> &nbsp; &nbsp;at JSON.parse.....

    Have double checked the body JSON multiple times: { "appID": "RoLnq8SeTdUWbtkmX6dR", "queries": [ { "tableName": "native-table-8VlEy9GI7SpQUosrEOAK", "columns": ["cNI9W", "aSJ65"] } ] }

    Any ideas?
    1319780376138481746-Screenshot_2024-12-21_at_10.33.54_AM.png
    1319780376490676326-Screenshot_2024-12-21_at_10.33.27_AM.png
  • Tod

    1 year ago

    Great energy @Hausia! Your continuous contribution to the toddle Community just made you advance to Community Level 2!
  • Erik Beuschau

    1 year ago

    Try checking the body that’s sent in the browsers dev tools (under network) when the request is sent. Just to make sure it’s encoded properly as a json object 🤞
  • Hausia

    1 year ago

    @Erik Beuschau that look right to you?
    1319785658323177553-Screenshot_2024-12-21_at_10.56.50_AM.png
  • Erik Beuschau

    1 year ago

    That looks like json to me 👍 I suggest you try sending the request in postman or hopscotch to see if there’s an issue in your payload or with the API. After that you can try to recreate the request in toddle 🤞