Login and Logout
<login> is the first command of every session and the only one accepted before it succeeds. It does three things at once: it authenticates you, it fixes the protocol version and language for the session, and it declares which object and extension namespaces you intend to use.
<login>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<login>
<clID>EXAMPLE-1</clID>
<pw>your-password</pw>
<options>
<version>1.0</version>
<lang>en</lang>
</options>
<svcs>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>urn:ietf:params:xml:ns:rgp-1.0</extURI>
<extURI>http://namespace.com.ua/epp/balance-1.0</extURI>
</svcExtension>
</svcs>
</login>
<clTRID>EXAMPLE-1-0001</clTRID>
</command>
</epp>
| Element | Rule |
|---|---|
<clID> | your registrar identifier, as issued |
<pw> | 6–16 characters. For longer, see loginSec below |
<version> | 1.0. Anything else is 2100 |
<lang> | one of the languages the greeting advertises: en, ru, ua, uk. Anything else is 2102 |
<objURI> | the objects you will use. Asking for one the greeting does not advertise is 2307 |
<extURI> | the extensions you will use. One we do not serve is 2307 |
Ask for what you will use, not for everything. The declaration is a contract for the session: an extension you did not declare will not be honoured in a later command, and one you declared but never use costs nothing. Build the list by intersecting the greeting with what your client supports — see Hello and Greeting.
What a refusal means
| Code | Meaning |
|---|---|
2501 | authentication refused, connection closing |
2502 | you already have the maximum number of sessions open |
2100 | <version> is not 1.0 |
2102 | <lang> is not one we advertise |
2307 | an <objURI> or <extURI> we do not serve |
2501 never says why. The registrar id, the password, the source address and — where one is pinned to your account — the client certificate are all checked, and all four failures answer identically. If a login that used to work stops, check the address you are connecting from before you touch the password: a new machine, a new NAT address or a new cloud region is the usual cause, and the fix is to have the address added. Repeated failures from one address are throttled, and the throttle survives reconnecting, so a retry loop makes the outage longer rather than shorter.
2502 is about sessions, not about you. Three concurrent sessions per registrar is the limit. A client that reconnects without logging out, or that crashes and restarts, leaves its old sessions to time out — and meets this code until they do. Always <logout>; it is one frame and it frees the slot immediately.
Changing your password
<newPW> applies together with a successful login: the old password authenticates the command, and the new one is in force from the next session. There are two forms, and which you use decides how long a password you may set.
The base form — up to 16 characters. That ceiling is the EPP schema's own pwType, not ours.
<login>
<clID>EXAMPLE-1</clID>
<pw>the-old-one</pw>
<newPW>the-new-one</newPW>
...
</login>
Through loginSec — up to 128 characters. Sixteen characters is the EPP schema's ceiling, not our view of what is long enough; RFC 8807 is the way to send a longer password. Put the sentinel [LOGIN-SECURITY] in the base <newPW> so a schema-validating intermediary still sees a well-formed frame, and the real value in the extension:
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<login>
<clID>EXAMPLE-1</clID>
<pw>the-old-one</pw>
<newPW>[LOGIN-SECURITY]</newPW>
<options><version>1.0</version><lang>en</lang></options>
<svcs>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:epp:loginSec-1.0</extURI>
</svcExtension>
</svcs>
</login>
<extension>
<loginSec:loginSec xmlns:loginSec="urn:ietf:params:xml:ns:epp:loginSec-1.0">
<loginSec:newPW>a considerably longer passphrase, up to 128 characters</loginSec:newPW>
</loginSec:loginSec>
</extension>
<clTRID>EXAMPLE-1-0002</clTRID>
</command>
</epp>
A password shorter than 6 characters, or longer than the ceiling for the form you used, is refused and the password is not changed.
What loginSec tells you back
When you declare the loginSec extension, a successful login may carry warnings about the connection you just made. They do not affect the login itself — that has already succeeded — but there is nowhere else these warnings appear.
type | When you get it |
|---|---|
certificate | your client certificate is close to expiry (warning) or has expired (error) |
tlsProtocol | the session negotiated an obsolete TLS version — move to 1.2 or 1.3 |
cipher | the session negotiated a cipher suite we consider weak — prefer an AEAD suite |
Log them: otherwise you find out that your client certificate has expired at the moment your login stops working.
<logout>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<logout/>
<clTRID>EXAMPLE-1-9999</clTRID>
</command>
</epp>
The answer is 1500, "Command completed successfully; ending session", and the server closes the connection after sending it. Read the answer before you close your end — a client that closes the socket as soon as it has written the frame cannot tell a clean logout from a dropped connection, and so cannot tell whether its last command was applied either.
Next: Commands and responses.
On this page