adding api token for new Personal Access Tokens & Service Account Keys#85
Open
jaredjackson wants to merge 4 commits into
Open
adding api token for new Personal Access Tokens & Service Account Keys#85jaredjackson wants to merge 4 commits into
jaredjackson wants to merge 4 commits into
Conversation
removing debugging line
removed blank line
cleaned up after modifcations
|
Hi @jaredjackson , I made the changes as in your PR, and getting the following error: Configuration: [Using Service account Key] Could you please help me. |
Owner
|
Hello all.. Sorry for the late response. I'm pretty sure you can still use the existing gem by doing the following: Hey guys.. I know this is late, but I think you can do the same thing with XML-RPC by doing the following: Infusionsoft.configure do |config|
config.user_agent = "CustomerHub-#{HUB_VERSION}"
config.api_key = SAK_KEY
config.api_url = "api.infusionsoft.com"
config.use_oauth = true
endThe key change is adding config.use_oauth = true. I'm pretty sure this will work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This creates a new configuration key, "api_token," for use with the latest required personal access tokens or service account keys. When using the api_token configuration, the old api_key is ignored by the service call. When the connection is executed, and an api_token is present, the api_url is corrected, and the api_token is added as a header to the request as required for authorization. If no api_key is present in the configuration, a dummy key is added and still included in the request. This is because the XML-RPC API still expects an api_key at the new URL, but the api_key is ignored for authentication purposes.
For those still using this gem for Infusionsoft's XML-RPC API, this should work without breaking for anyone who hasn't updated yet. All tests passed after these changes.