{"action":"created","issue":{"url":"https://api.github.com/repos/Dwolla/dwolla-v2-ruby/issues/1","labels_url":"https://api.github.com/repos/Dwolla/dwolla-v2-ruby/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Dwolla/dwolla-v2-ruby/issues/1/comments","events_url":"https://api.github.com/repos/Dwolla/dwolla-v2-ruby/issues/1/events","html_url":"https://github.com/Dwolla/dwolla-v2-ruby/issues/1","id":127229231,"number":1,"title":"Error in getting application token","user":{"login":"irahulsingh","id":4716928,"avatar_url":"https://avatars.githubusercontent.com/u/4716928?v=3","gravatar_id":"","url":"https://api.github.com/users/irahulsingh","html_url":"https://github.com/irahulsingh","followers_url":"https://api.github.com/users/irahulsingh/followers","following_url":"https://api.github.com/users/irahulsingh/following{/other_user}","gists_url":"https://api.github.com/users/irahulsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/irahulsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irahulsingh/subscriptions","organizations_url":"https://api.github.com/users/irahulsingh/orgs","repos_url":"https://api.github.com/users/irahulsingh/repos","events_url":"https://api.github.com/users/irahulsingh/events{/privacy}","received_events_url":"https://api.github.com/users/irahulsingh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-18T13:46:12Z","updated_at":"2016-01-20T23:32:17Z","closed_at":null,"body":"We don't want to go over OAuth path, we are going to use White Label API.\r\n\r\nThis is my config in /initializers\r\n```\r\n$dwolla = DwollaV2::Client.new(id: \"4ccmHuxwlohsKxxxxxxxxxxxxxxxxxxxxxxxxx\", secret: \"B0SlLhSLGsOkBl8zBjxxxxxxxxxxxxxxxxx\") do |optional_config|\r\n  optional_config.environment = :sandbox\r\nend\r\n```\r\nWhen I tried to get an application token I got following error.\r\n```\r\n2.2.2 :015 >  token = $dwolla.auths.client scope: \"ManagerCustomers|Funding\"\r\nTypeError: no implicit conversion of Symbol into Integer\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/dwolla_v2-0.1.0/lib/dwolla_v2/auth.rb:49:in `[]'\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/dwolla_v2-0.1.0/lib/dwolla_v2/auth.rb:49:in `request_token'\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/dwolla_v2-0.1.0/lib/dwolla_v2/auth.rb:6:in `client'\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/dwolla_v2-0.1.0/lib/dwolla_v2/portal.rb:9:in `public_send'\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/dwolla_v2-0.1.0/lib/dwolla_v2/portal.rb:9:in `method_missing'\r\n\tfrom (irb):15\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/commands/console.rb:90:in `start'\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/commands/console.rb:9:in `start'\r\n\tfrom /home/akaruilabs/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/commands.rb:62:in `<top (required)>'\r\n\tfrom bin/rails:4:in `require'\r\n\tfrom bin/rails:4:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/Dwolla/dwolla-v2-ruby/issues/comments/173401136","html_url":"https://github.com/Dwolla/dwolla-v2-ruby/issues/1#issuecomment-173401136","issue_url":"https://api.github.com/repos/Dwolla/dwolla-v2-ruby/issues/1","id":173401136,"user":{"login":"sausman","id":309638,"avatar_url":"https://avatars.githubusercontent.com/u/309638?v=3","gravatar_id":"","url":"https://api.github.com/users/sausman","html_url":"https://github.com/sausman","followers_url":"https://api.github.com/users/sausman/followers","following_url":"https://api.github.com/users/sausman/following{/other_user}","gists_url":"https://api.github.com/users/sausman/gists{/gist_id}","starred_url":"https://api.github.com/users/sausman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sausman/subscriptions","organizations_url":"https://api.github.com/users/sausman/orgs","repos_url":"https://api.github.com/users/sausman/repos","events_url":"https://api.github.com/users/sausman/events{/privacy}","received_events_url":"https://api.github.com/users/sausman/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T23:32:17Z","updated_at":"2016-01-20T23:32:17Z","body":"Sorry for the delayed response @irahulsingh, I just noticed this.\r\n\r\nA couple days ago the token endpoint in our sandbox environment was returning a 500 with HTML in the response body which the library wasn't expecting. I just updated the gem (v0.1.1) to raise a more friendly error when this happens (it will now raise a `Dwolla::Error`).\r\n\r\nThanks for bringing this to our attention!"}}