Insightly / insightly-ruby

Ruby Library for the Insightly REST API
16 stars 45 forks source link

Change api_key #37

Open rept opened 8 years ago

rept commented 8 years ago

Just to make sure: it's ok to change the Insightly2.api_key several times right?

I seem to randomly get these messages:

INSIGHTLY starting [get] request to [Contacts] with no payload

Although the only thing I do is:

  Insightly2.api_key = user.insightly['insightly_key']
  contacts = Insightly2.client.get_contacts

I also do this when the user first enters their api key in my application. If the key is incorrect I rescue the exception and give notice that the key is incorrect. I noticed that when I first start with a good key, the next requests keep being good although I can change my Insightly2.api_key to a bad one, the Insightly2.client.get_contacts keeps working. When I start off with a bad one, the good ones don't work anymore afterwards.

rept commented 8 years ago

Fixed my problem with this PR: https://github.com/Insightly/insightly-ruby/pull/38
please review.

kftwotwo commented 7 years ago

@rept this was the issue I looking for FYI.