Connect to TigerGraph using JQuery to Create, Read, Update and Delete Nodes and Relationships

Can you please provide an example of how to use JQuery and AJAX to connect to TigerGraph, and to then create, read, update and delete nodes and relationships?

Example JQuery AJAX:

$( document ).ready(function() {
  var api_url = ''
  var key = '5b578yg9yvi8sogirbvegoiufg9v9g579gviuiub8' // not real

  $( ".content a" ).each(function( index, element ) {

        url: api_url + "?key=" + key + " &q=" + $( this ).text(),
        contentType: "application/json",
        dataType: 'json',
        success: function(result){


What would the your-token-here value be? Where would I find that please?

When I try the above using the pwd for my tg database, I get the following type of error:

Access to XMLHttpRequest at ‘’ from origin ‘’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.