Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api_key is not passed in subscribe method #4

Open
masterkain opened this issue May 3, 2020 · 2 comments
Open

api_key is not passed in subscribe method #4

masterkain opened this issue May 3, 2020 · 2 comments

Comments

@masterkain
Copy link

masterkain commented May 3, 2020

Sendyr.configure do |c|
  c.url     = 'https://sendy.mydomain.com'
  c.api_key = 'xxxxxx'
end
@status=200 @reason_phrase="OK" @response_body="API key not passed"

had to specify it:

sendyr_client.subscribe(email: email, api_key: Sendyr.configuration.api_key)
@patriciojofre
Copy link

@masterkain this PR should fix this issue: #5

Sendy requires api key in subscribe endpoint 🤯

Screen Shot 2020-07-08 at 17 19 20

@maesitos
Copy link

If you don't want to fork it, while you wait for the PR you can monkeypatch it:

module Sendyr
    class Client
        alias subscribe_alias subscribe
        def subscribe(opts = {})
            subscribe_alias(opts.merge(api_key: Sendyr.configuration.api_key))
        end
    end
end

Peace ✌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants