How to use the Coda API using JS?

Hi guys!

Is anyone familiar with using the Coda API using Javascript?

I am trying to make a simple call, using a test token, but it keeps returning 401 “Unauthorized” errors.

$(document).ready(function() {
      url: "",
      type: "GET",
      headers: {"Authorization": 'TOKEN'},
      success: function(result) {
      error: function(error) {

I am pretty sure it’s a fairly basic formatting issue, however, the docs don’t demonstrate JS calls.

Is anyone familiar with doing this in JS?

1 Like

Try changing the headers to:

headers: {"Authorization": 'Bearer TOKEN'},

The reference on the Authorization header is here:

1 Like

That worked! Thanks!

1 Like