Content API ERR_ABORTED 404

Hello,

I’m trying to get the contentAPI to load but am getting a “net :: ERR_ABORTED 404” error on the scr line.

I have added this to the default.hbs file:

And the basic Working Example for Ghost Docs as below added as a code injection onto a page. Here is the const block :

const api = new GhostContentAPI({
url: ‘https://martinetrelaun.com/ghost’,
key: ‘1085686d218ab4be3f12286caa’,
version: “v3”
});

What am I missing?

Your url is incorrect - you need to copy the “API URL” from the integrations screen.

Hi Hannah,

I have tried that url as well (below), but I get the same error:

const api = new GhostContentAPI({
url: ‘https://martinetrelaun.com’,
key: ‘1085686d218ab4be3f12286caa’,
version: “v3”
});

This is what I have in the default.hbs :slight_smile:

src="https://unpkg.com/@tryghost/content-api@v3/umd/content-api.min.js

The site is private, is that the problem?

Solved this issue by changing the source path in the default.hsb to:
src=“https://unpkg.com/@tryghost/content-api@1.4.14/umd/content-api.min.js

from:
src=“https://unpkg.com/@tryghost/content-api@v3/umd/content-api.min.js