Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

active_sms-backend-aws

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

active_sms-backend-aws

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ActiveSMS::Backend::AWS

Build Status

ActiveSMS backend to send sms using Amazon Web Services. At this point gem does not support SenderID. If you know how to specify it - open issue or make pull request, all contributions are welcome!

Before installation - obtaining token

Before you can use this gem, you should get tokens from amazon web services (AWS). Here are steps to achieve that:

  1. Go to AWS registration page

  2. After you registered and logged in, go to IAM users

  3. Click "Create new users", enter username of your wish (in my case testuser) and then click "Create".

  4. You should see similar picture:

    security credentials

    save access key id and secret acces key somwhere.

This is simple example on how to get them and make things work quick. In reality AWS support various access options, you may read them here and configure it more strict or closer to your needs.

Installation & usage

Add this line to your application's Gemfile:

gem "active_sms-backend-aws"

Then somewhere in your initialization code:

require "active_sms"

ActiveSMS.configure do |c|
  c.register_backend(:my_main_backend,
    ActiveSMS::Backend::AWS,
    access_key: ENV["AWS_ACCESS_KEY"],
    secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
    region: ENV["AWS_REGION"] # Optional, default will be "us-east-1"
  )

  c.default_backend = :my_main_backend
end

This is an simple example of configuration. Before running application you should specify AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY and AWS_REGION environment variables. You may change initializer code to suit your needs more, just make sure you never store credentials commited to your codebase. It should be stored separately from application.

Now, whenever you need to send SMS, just do:

# Will immediately send sms
ActiveSMS.send_sms("+10000000000", "My sms text")

For more advanced usage please go to ActiveSMS documentation

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Fedcomp/active_sms-backend-aws.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 27 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc