askacharge.com Blog
ESEN
For your brand

EV charger won't connect to the OCPP server (401, 403, connection refused): causes and fix

Your charger never shows as connected on the OCPP platform. The six causes we see on real chargers, most likely first, how to tell which one is yours and how to fix it.

askacharge.com · OCPP errors · Updated 11 October 2026

What happens

You entered the OCPP server URL on the charger, restarted it, and the platform still shows it offline. Sometimes the charger shows an error (401, 403, Connection refused, Handshake failed) and sometimes nothing at all. It is almost always one of these six things.

Check it in two minutes

Point your charger at the test server: within a minute you see whether it arrives, how (ws or wss), whether it sends a credential and in what form, and whether the URL has the identity twice. If it doesn't even show up on the test server, the problem is the network or the URL, not the platform. Open the OCPP test server →

The causes, most likely first

1. The identity is in the URL twice

Many chargers append their identity to the end of the URL themselves. If you already typed it, what arrives is …/ocpp/your-brand/CP001/CP001. A real charger tried 6,516 times in five days like that, and was rejected every time.

How to fix it: Enter the URL without the identity if the charger has a separate field for it (Charge Point ID, Charge Box ID). If it doesn't, then yes, at the end.

2. No password, or not the one the server expects

With OCPP security profile 2 the charger sends a username (its identity) and a password in the handshake. If it sends nothing, or the username doesn't match the identity exactly (case included), the server rejects it.

How to fix it: Look on the charger for Authorization Key, Basic Auth, Password or Security Profile. The username is the identity, letter for letter.

3. The password is hexadecimal and the charger sends it as bytes

The OCPP 1.6 security whitepaper defines the AuthorizationKey in hex, and some firmwares (for example, those based on MicroOcpp) send the bytes it represents, not the text. If the server only compares the text, it fails even with the right key.

How to fix it: askacharge.com accepts both. On another platform, try a key that isn't hexadecimal.

4. Encryption: wss:// on a unit that only speaks ws://, or the reverse

Some models don't support an encrypted connection. And a server that only listens encrypted redirects ws:// to https, and a charger doesn't follow redirects.

How to fix it: Check what the model supports. If it only speaks ws://, the platform has to accept that explicitly for that charger.

5. The charger's clock is wrong

Over wss:// the charger checks that the server certificate is valid now. A charger that boots in 1970 or on its factory date thinks the certificate isn't valid yet and drops the connection.

How to fix it: Set an NTP server on the charger, or set the time by hand before connecting.

6. There is no real network

The previous network's SIM cancelled, the laptop on the guest Wi-Fi (which isolates devices), or a firewall that blocks outgoing port 443.

How to fix it: Try a cable to the main router before looking any further.

What askacharge.com does

If the charger connects but isn't registered, it shows up in the panel as “pending” instead of being rejected without a trace. And when a charger tries more than 20 times in an hour and is rejected, the panel shows it in red with the reason and we email the owner the steps.

Frequently asked questions

What does a 401 or 403 error mean when connecting an OCPP charger?

That the server received the handshake but won't accept it: almost always a missing password, a username that doesn't match the identity, or a URL shape it doesn't expect (such as the identity repeated).

Do I have to put the charger identity at the end of the URL?

Only if the charger has no separate field for it. If it does, the charger appends it itself, and typing it too makes it arrive twice.

Other OCPP errors

Related reading

What's in front of you?

I'm at the charger

Try it in a minute on the OCPP test server: no account, you see live what it sends and what would fail on a real connection.

Test my charger

My charger has been down for a while

If the platform that ran it shut down, stopped supporting it or the contract ended: 3 months free and basic setup on us. We help you remotely.

Ask for the rescue terms

It connects, I want to run it

Dashboard, tariffs, QR payments and API. 30 days free, no card, no commitment.

Create an account

Won't connect? Send us the model and what you see and we'll tell you by email what to change. Free. info@askacharge.com

Is it your home charger? We're preparing askacharge.com/casa: your charger in the cloud with your own API, for Home Assistant or whatever you use. The first one free. Waiting list