SFTA
1
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 Content API JavaScript Client 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?
Hannah
2
Your url is incorrect - you need to copy the “API URL” from the integrations screen.
SFTA
3
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
src="https://unpkg.com/@tryghost/content-api@v3/umd/content-api.min.js
The site is private, is that the problem?
SFTA
4