API Request Failed: GET /api/v4/entitlements (502)

API Request Failed: GET /api/v4/entitlements (502) this is the message I get when I visit this page of my newly setup cloudflare account.
was following Sandbird’s HowTo here:

https://discourse.osmc.tv/t/howto-free-tk-domain-name-that-always-points-to-your-pi/14083

but got stuck on point 4:

Blockquote We’ll also need an API key from cloudflare…We’ll use that for the updater to log in to cloudflare and update your IP. At the top right corner click your username and go to My Settings. Scroll down where it says API KEY and create a GLOBAL API KEY, then copy it…you’ll need it later on.

Blockquote

When I tried to scroll down to API under my username there is nothing under my settings relating to API or global key or whatever?

All I get is Red bar at bottom of screen with the message:

API Request Failed: GET /api/v4/entitlements (502)

I have no idea when it comes to networking and port forwarding etc. well very little idea so I am at a loss as to how to proceed?
Thank you in advance for any help.

Much appreciated

M

Sorry, fixed that…the global key thing is in ‘My Profile’ not ‘Settings’.
Thats where you get it. You need that Key in order for cloudflare to accept your request.

thanks yes I figured it out, cheers.
One other thing when you go into Nano and you mention CtrlX, Y, Enter
the first time it just does exactly what I expected - exits with no choice for Y/N? but on second instance of Nano when doing CtrlX it does give you the Y/N choice? is this correct because in your instructions you say it will give Y/N prompt both times but it didnt do this when I followed your instructions to the t(at least I think I did?) is there a way to check that all is well with the daemon service running smoothly?

If you havent made any changes to the file then CtrlX wont show you the Y/N notice.
Just re-edit the file and when it opens make sure the text you put in is there…if not then redo that step :slight_smile:

The last 4 commands would probably show if something is wrong with the service:

systemctl start ddclient.service
systemctl enable ddclient.service
systemctl daemon-reload
ddclient -daemon=0 -debug -verbose -noquiet

must have done it right because I just started my VPN and then logged in via Putty and was able to access /home/osmc as root from Netherlands.
I’m not in the Netherlands, obviously. So this daemon will run continuously as long as I leave the Pi switched on? what happens if Pi does switch off does this mean the daemon will have to be restarted?

So long as you ran the systemctl commands correctly and they didn’t return any errors then the service should restart automatically every time your Pi boots up.