Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfusionSoft Retiring Legacy API #176

Open
k412L opened this issue Jun 25, 2024 · 4 comments
Open

InfusionSoft Retiring Legacy API #176

k412L opened this issue Jun 25, 2024 · 4 comments

Comments

@k412L
Copy link

k412L commented Jun 25, 2024

Hello,

I've just receive an email from InfusionSoft/Keap that they'll be removing the legacy API soon. I tried generating an SKA API and replaced the legacy API from the config.php file, but when I tested the connection, it says I entered the wrong API key and can't connect. Does the sdk not accept SKA API? should I continue using the legacy API? will it be affected once Keap retires the legacy API?

You're reply would be much appreciated. Thank you.

@tropsmr2
Copy link

tropsmr2 commented Jul 12, 2024

I'm also hoping/deeply desiring an enhancement to the SDK to keep it working. Keap seems to have embedded a feature to make it easy to continue to use the legacy API keys. The library requires a seemingly minor modification to use the Keap updated method.

from https://help.keap.com/help/sunsetting-legacy-api-keys :
If you use an alternate language to integrate or you are not on the latest version of our PHP SDK, you can continue to use your Legacy Key to make calls against the Keap API for now, but you will need to make some minor adjustments to your API calls.

All calls must be routed to the main API endpoint, changing from

https://yourinstanceid.infusionsoft.com/api/xmlrpc/v1

to:

https://api.infusionsoft.com/crm/xmlrpc/v1

You must send the key as a Header on the request of: “X-Keap-API-Key”: “YourLegacyKey”. The “PrivateKey” value in the XML POST body can then be any placeholder.

From: https://developer.infusionsoft.com/legacy-key-migration/

If You use PHP to integrate
We have released a new version of our PHP SDK that supports an APIKey parameter, and your existing Legacy Key will continue to be functional via this authentication method.

You can also generate a new SAK (Service Account Key) in your Keap app and use that instead in the same manner, retiring your Legacy Key in favor of our current authentication methods to future-proof your integration, as we do plan to revoke all Legacy Keys in Q1 2025.

If: You use another language to integrate
You can continue to use your Legacy Key to make calls against the Keap API for now, but will have to make some minor alterations to your calls.

First, all calls must be routed to the main API endpoint, changing from:
https://YourInstanceId.infusionsoft.com/api/xmlrpc/v1
to:
https://api.infusionsoft.com/crm/xmlrpc

You will then need to change how you are sending your key to be a Header on the request, rather than a part of the XML POST body:
X-Keap-API-Key: YourLegacyKey

You can also generate a new SAK (Service Account Key) in your Keap app and use that instead in the same manner, retiring your Legacy Key in favor of our current authentication methods to future-proof your integration, as we do plan to revoke all Legacy Keys in Q1 2025.

While every code update will be different, the following examples show how to use the Keap XML/RPC with both the old and new ways of calling Keap.

const url = 'https://api.infusionsoft.com/crm/xmlrpc';
const xmls = <?xml version="1.0"?> <methodCall> <methodName>ContactService.listLinkedContacts</methodName> <params> <param> <value><string>dummKey</string></value> </param> <param> <value><int>1</int></value> </param> </params> </methodCall>;

const options = {
method: 'POST',
headers: {
'Content-Type': 'application/xml',
'X-Keap-Api-Key': 'YOUR_LEGACY_KEY',
},
body: xmls,
};

fetch(url, options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

So, on the surface, it appears the mod to the library should be fairly simple for someone who knows what they are doing. Perhaps just a change to the xmlrpc.inc and the config.php file?

On Aug 5, Keap will begin disabling the Legacy API key connection.

Any help or insights would be greatly appreciated!

@tropsmr2
Copy link

@k412L Are you still looking for help with getting SDK to do SAK? troy

@k412L
Copy link
Author

k412L commented Jul 18, 2024

hi @tropsmr2 yes, I reached out to the developers but none of them replied. have you found any solution yet on your end?

@tropsmr2
Copy link

tropsmr2 commented Jul 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants