Skip to content
A Ruby gem for discovering a URL's IndieAuth, Micropub, Microsub, and Webmention endpoints.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A Ruby gem for discovering a URL's IndieAuth, Micropub, Microsub, and Webmention endpoints.

Gem Downloads Build Maintainability Coverage

Key Features

Getting Started

Before installing and using indieweb-endpoints-ruby, you'll want to have Ruby 2.4 (or newer) installed. It's recommended that you use a Ruby version managment tool like rbenv, chruby, or rvm.

indieweb-endpoints-ruby is developed using Ruby 2.4.6 and is additionally tested against Ruby 2.5.5 and 2.6.3 using Travis CI.


If you're using Bundler, add indieweb-endpoints-ruby to your project's Gemfile:

source ''

gem 'indieweb-endpoints'

…and hop over to your command prompt and run…

$ bundle install


Basic Usage

With indieweb-endpoints-ruby added to your project's Gemfile and installed, you may discover a URL's IndieWeb-relevant endpoints by doing:

require 'indieweb/endpoints'

endpoints = IndieWeb::Endpoints.get('')

puts endpoints # => #<OpenStruct authorization_endpoint="", micropub="", microsub="", redirect_uri=nil, token_endpoint="", webmention="">

This example will search for valid IndieAuth, Micropub, and Webmention endpoints. In this case, the program returns an OpenStruct with the following attributes (represented below as a Hash):

  authorization_endpoint: '',
  micropub: '',
  microsub: '',
  redirect_uri: nil,
  token_endpoint: '',
  webmention: ''

Each attribute will return either a String representing a URL or nil. The redirect_uri attribute will return either an Array or nil since a given URL may register multiple callback URLs.

Advanced Usage

Should the need arise, you may work with the IndieWeb::Endpoints::Client class:

require 'indieweb/endpoints'

client ='')

puts client.response # => #<HTTP::Response/1.1 200 OK {…}>

endpoints = client.endpoints

puts endpoints.authorization_endpoint # => ''
puts endpoints.micropub               # => ''
puts endpoints.microsub               # => ''
puts endpoints.redirect_uri           # => nil
puts endpoints.token_endpoint         # => ''
puts endpoints.webmention             # => ''

Exception Handling

There are several exceptions that may be raised by indieweb-endpoints-ruby's underlying dependencies. These errors are raised as subclasses of IndieWebEndpointsError (which itself is a subclass of StandardError).

From jgarber623/absolutely and sporkmonger/addressable:

  • IndieWeb::Endpoints::InvalidURIError

From httprb/http:

  • IndieWeb::Endpoints::ConnectionError
  • IndieWeb::Endpoints::TimeoutError
  • IndieWeb::Endpoints::TooManyRedirectsError


Interested in helping improve indieweb-endpoints-ruby? Awesome! Your help is greatly appreciated. See for details.

By contributing to and participating in the development of indieweb-endpoints-ruby, you acknowledge that you have read and agree to the IndieWeb Code of Conduct.


indieweb-endpoints-ruby wouldn't exist without IndieAuth, Micropub, and Webmention and the hard work put in by everyone involved in the IndieWeb movement. Additionally, the comprehensive Webmention Endpoint Discovery test suite at was invaluable in the development of this Ruby gem.

indieweb-endpoints-ruby is written and maintained by Jason Garber.


indieweb-endpoints-ruby is freely available under the MIT License. Use it, learn from it, fork it, improve it, change it, tailor it to your needs.

You can’t perform that action at this time.