Packages

UserCheck's public REST API help your to stop Disposable Emails from Creating Spam Accounts Integrate an always up-to-date API to instantly detect temporary and disposable email addresses during user registration.

Current section

Files

Jump to
ex_user_check lib ex_user_check.ex
Raw

lib/ex_user_check.ex

defmodule ExUserCheck do
@root_api "https://api.usercheck.com"
def root, do: @root_api
@spec api_key() :: String.t()
@doc "Return the API key from config.exs"
def api_key do
Application.get_env(:ex_user_check, :api_key) ||
raise """
Missing API key
Please add usercheck.com API key :
# config/prod.secret.exs or dev.secret.exs
config :ex_user_check, :api_key, "my_api_key"
"""
end
end