Coder Social home page Coder Social logo

cubscout's People

Contributors

dependabot[bot] avatar div-yah avatar gregmolnar avatar joren avatar norydev avatar nudded avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

terrell

cubscout's Issues

Error "no route and no API found with those values"

Earlier today, HelpScout made a "transparent update" to their gateway that broke my app using this gem. This caused all of my requests to return an error of "no route and no API found with those values"

I dug around some, installed the httplog gem, and saw that the calls were being made to https://api.helpscout.net/oauth2/token instead of https://api.helpscout.net/v2/oauth2/token as directed in the documentation at https://developer.helpscout.com/mailbox-api/overview/authentication/. In other words, the /v2 part was not being included and that was generating.

I was able to get my app working again by changing a line in the oauth_client method in the config.rb to include the path of the api_prefix in the URL.

OAuth2::Client.new(@client_id, @client_secret, site: api_prefix, token_url: '/oauth2/token')
to
OAuth2::Client.new(@client_id, @client_secret, site: api_prefix, token_url: "#{URI::parse(api_prefix).path}/oauth2/token")

Here is a link to the change: https://github.com/terrell/cubscout/blob/6c63c3c08229e3427de5f9d1c0c0e9f39d3fc13c/lib/cubscout/config.rb

Hope this helps! I'm a one-man developer at my company and your gem has saved me a ton of time migrating to the new HelpScout API 2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.