silverfin / cubscout Goto Github PK
View Code? Open in Web Editor NEWHelp Scout api v2 ruby gem
License: MIT License
Help Scout api v2 ruby gem
License: MIT License
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.