epp-ruby
Ruby client for communicating with EPP (Extensible Provisioning Protocol) services. Supports domain, contact, and host management including transfer handshake and domain listing.
Maintained fork of railsguru/epp-client with additional features and fixes.
Installation
Add this line to your application's Gemfile:
gem 'epp-ruby'
Or install it yourself:
$ gem install epp-ruby
Usage
require 'epp-ruby'
client = EPP::Client.new('username', 'password', 'epp.server.com')
client.hello
Domain Check
resp = client.check EPP::Domain::Check.new('example.com', 'example.net')
check = EPP::Domain::CheckResponse.new(resp)
check.available?('example.com') #=> true
check.available?('example.net') #=> false
Domain Info
resp = client.info EPP::Domain::Info.new('example.com')
info = EPP::Domain::InfoResponse.new(resp)
info.name #=> "example.com"
info.nameservers #=> [{"name"=>"ns1.example.net"}]
Domain Create
resp = client.create EPP::Domain::Create.new('example.com', period: 1, unit: 'y',
nameservers: ['ns1.example.net', 'ns2.example.net'],
registrant: 'contact-id',
auth_info: 'secret123')
create = EPP::Domain::CreateResponse.new(resp)
Domain Transfer
resp = client.transfer EPP::Domain::Transfer.new('example.com', 'auth-code', op: 'request')
Domain List
resp = client.list EPP::Domain::List.new
Transfer Handshake (Accept/Reject)
resp = client.transfer_handshake EPP::Commands::TransferHandshake.new('example.com', op: 'approve')
Available Commands
check— check domain/contact/host availabilitycreate— register domains, contacts, or hostsdelete— remove domains, contacts, or hostsinfo— query domain/contact/host detailsrenew— renew domain registrationtransfer— initiate or query domain transferstransfer_handshake— accept or reject pending transfersupdate— modify domains, contacts, or hostspoll/ack— poll for and acknowledge messageslist— list domains
History
This gem is a maintained fork of epp-client (v2.1.0) by Geoff Garside, which has been inactive since 2014. It adds transfer handshake support, domain listing, improved domain create/renew, and various bug fixes.
License
MIT