Skip to content

Commit

Permalink
Filling in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
justingit committed Sep 15, 2021
1 parent af9cc17 commit 34b986f
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 1 deletion.
Expand Up @@ -13,13 +13,14 @@ The best way to do that, is to try it out!

=head2 Introduction

Dada Mail's web services reveal some of the administrative features you'll find in Dada Mail's List Control Panel. Currently, there are services to allow you to verify subscriptions, subscribe addresses, as well as send mass mailings.
Dada Mail's web services reveal some of the administrative features you'll find in Dada Mail's List Control Panel. Currently, there are services to allow you to create a new list, verify subscriptions, subscribe addresses, as well as send mass mailings.

These services are authenticated using an HMAC-with-Public/Private Hashes scheme. Data sent is not encrypted, so we suggest always to connect to the web service with an SSL connection.

Example clients are currently available in B<Perl> and B<php> and allow you to
access the services available remotely.


=head2 Public and Private Keys

Both the public and private keys for your mailing list can be accessed in the mailing list's control panel under,
Expand All @@ -28,6 +29,15 @@ I<Mailing List - Web Services API>

You may also reset your keys. Doing so will invalidate any other key pairs for the mailing list you're currently working with.


=head2 Global Public and Private Keys

Global key pairs can also be found under, I<Mailing List - Web Services API>. These key pairs can be enabled and the keys can be reset using the Dada Mail Installer. More information:

L<https://dadamailproject.com/d/install_dada_mail-advanced_configuration.pod.html#Configure-Global-API-Options>

Global keys can be used for anything you would use mailing list-specific keys, as well when creating a new mailing list.

=head3 Perl Client

The Perl Client is called, C<DadaMailWebService> and is located at I<dada/extras/scripts/webservices/DadaMailWebService.pm>.
Expand Down Expand Up @@ -171,6 +181,10 @@ The C<request> method will make the request for the service you want, see the Sy

=over

=item * create_new_list

(using Global API Keypairs only)

=item * validate_subscription

=item * subscription
Expand Down Expand Up @@ -308,6 +322,10 @@ The C<request> method will make the request for the service you want, see the Sy

=over

=item * create_new_list

(using Global API Keypairs only)

=item * validate_subscription

=item * subscription
Expand Down Expand Up @@ -391,6 +409,53 @@ C<settings> has no paramaters to pass, so is send using B<GET>. The C<nonce> (ex

=head3 Services

=head4 create_new_list

C<create_new_list> creates a new list.

The following paramaters are required to be passed:

=over

=item * settings

Holds the settings that will make up the new mailing list. Example:

"settings" : {
"list" : "list",
"list_name" : "List Name"
"list_owner_email" : "user@example.com",
"password" : "Password"
"info" : "List Description",
"privacy_policy" : "Privacy Policy"
"physical_address" : "Physical Address",
"consent" : "Consent for Mailing List"
},

=item * options

Holds any options you would like for your mailing list. The following options are supported:

=over

=item * send_new_list_welcome_email

Boolean, B<default: 0>. If B<1> is passed, an email will be sent to the list owner with information about the new mailing list


=item * send_new_list_welcome_email_with_list_pass

Boolean, B<default: 0>. If B<1> is passed (and B<send_new_list_welcome_email> is passed and set to B<1>), an email will be sent to the list owner with information about the new mailing list, including the mailing list password.

=item * clone_settings_from_list

String, B<default: undef>. If a valid list short name is password, list settings will be cloned from the host list, towards this new list.

=back

=back


=head4 validate_subscription

C<validate_subscription> takes a list of addresses (and associated metadata) and validates the subscription, but B<does not subscribe any of the addresses>.
Expand Down
Expand Up @@ -397,6 +397,32 @@ Use this button to check if Dada Mail will be able to retrieve your template. If

B<Config Variable:> C<$TEMPLATE_OPTIONS>.

=head2 Configure Global API Options

Dada Mail provides a RESTful API to many of the functions of the app.
Public/Private keys are available for each mailing list,
and Global Public/Private API keys can be configured through the installer.
Global key pairs can do whatever the list key pairs can, as well as create new mailing lists.

For more information on Dada Mail's RESTful API, see the following docs:

L<https://dadamailproject.com/d/features-restful_web_services.pod.html>


=head3 Enable Global API

Check this option to enable the Global API (disabled by B<default>).

=head3 Public Key, Private Key

Below are listed your Global Public and Private Keys.
These keys aren't editable within the installer,
but you may reset them by clicking the button labeled,
B<Reset Global API Keys>.

Copy these keys down! They'll also be available when you log into a list using your B<Dada Mail Root Password>
and then going to, B<Mailing List: Web Services API> under, B<Global Key Pairs>.


=head2 Configure Security Options

Expand Down

0 comments on commit 34b986f

Please sign in to comment.