harvesthq / platform

A whole new way to add time tracking to your web application.
https://www.getharvest.com/platform
59 stars 11 forks source link

Harvest Button: Getting "401 Unauthorized" responses #37

Closed wilkesreid closed 7 years ago

wilkesreid commented 7 years ago

The Harvest button script is returning 401 unauthorized as the response for the request for "https://platform.harvestapp.com/platform/running_timer.json". The response body says, "You must be authenticated with Harvest to complete this request." As a result, the buttons just don't work. Clicking on them does nothing. I would expect clicking on them to bring up a log-in modal. This is causing significant productivity interference in my app where non-logged in users cannot easily log in by clicking the button, and the app just feels broken because nothing happens.

adunkman commented 7 years ago

Are you still having this problem?

The 401 response is expected — if the user has not been authenticated in Harvest, they will receive a 401 response. They should be able to click the button and be presented with a login dialog, though.

wilkesreid commented 7 years ago

I jumped the gun opening an issue, which is why I closed it immediately after. I'm having event binding issues in my app where the harvest buttons don't actually get the event added to them. It's in an AngularJS app, and it has something to do with the order in which the Harvest API javascript gets called and when the DOM gets generated. Nothing to do with the 401 unauthorized.

adunkman commented 7 years ago

Gotcha! Good luck! :heart: