Sha256: a1ec7ef54c79141d3232b47d68659e4c7386b8dc72ba928258a7ab428f0c5451
Contents?: true
Size: 754 Bytes
Versions: 9
Compression:
Stored size: 754 Bytes
Contents
# Authentication Example When you sign up for an account, you are given an **API key**. You authenticate to the [MailerLite][mailerlite] API by providing your API key in the request. You can find your API key in page: Integrations ยป Developer API. ## Using variable ```ruby client = MailerLite::Client.new(api_key: 'my-secret-api-key') ``` Example: ```ruby client.campaigns ``` ## Using global class config Or create file under `config/initializers/mailerlite.rb` ```ruby MailerLite.configure do |config| config.api_key = 'my-secret-api-key' end ``` When you configured global settings in file, then you can request methods on `MailerLite` class directly. Example: ```ruby MailerLite.campaigns ``` [mailerlite]: https://www.mailerlite.com
Version data entries
9 entries across 9 versions & 1 rubygems