-
Notifications
You must be signed in to change notification settings - Fork 53
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
Updates to cater for Keap sunsetting of legacy API keys. #177
base: master
Are you sure you want to change the base?
Conversation
This changes the legacy key settings in config.php to allow use of a SAK (Service Access Key) and adds the new X-Keap-Api-Key header in xmlrpc.php.
@prelude2a @joeynovak |
@tropsmr2 |
@prelude2a @joeynovak
Thanks for the reply.
1. Pulled the SDK .zip file from the prelude2 fork
2. Validated that the mods are in the files I pulled (checked App.php for api.infusionsoft.com mods)
3. Copied and modified the config.php fle (unsure what $infusionsoft_host does now?) (note that the config.php file is missing the closing ?> php tag)
<?php
$infusionsoft_host = 'qg301.infusionsoft.com'; // unsure what function this variable serves now?
//deprecated - Keap are sunsetting legacy Keys Oct 2024 - Comment out this line once you have set up your new SAK key
//$infusionsoft_api_key = 'YOUR API KEY GOES HERE';
//Uncomment the following line once you have generated and copied in your SAK key
$infusionsoft_sak_key = 'KeapAK-cc992xxxxx';
//To Add Custom Fields, use the addCustomField method like below.
//Infusionsoft_Contact::addCustomField('_LeadScore');
//Below is just some magic... Unless you are going to be communicating with more than one APP at the SAME TIME. You can ignore it.
//Comment this line out once you have set up your new SAK key
//Infusionsoft_AppPool::addApp(new Infusionsoft_App($infusionsoft_host, $infusionsoft_api_key, 443));
//Uncomment the following line once you have generated and copied in your SAK key above
Infusionsoft_AppPool::addApp(new Infusionsoft_App($infusionsoft_host, $infusionsoft_sak_key, 443));
This what I get when I run testConnectivity.php:
Testing Host api.infusionsoft.com:443 with API Ping.
Something is wrong, see below for details, check your config file and try again.
Didn't receive 200 OK from remote server. (HTTP/2 401 ) Attempted: 1 time(s).
If I run qa_tests.php, I get the same error:
Connectivity Test
Testing Host api.infusionsoft.com:443 with API Ping.
Something is wrong, see below for details, check your config file and try again.
Didn't receive 200 OK from remote server. (HTTP/2 401 ) Attempted: 1 time(s).
<- Back
If I run qa_tests.php with the legacy API SDK, it returns:
Connectivity Test
Testing Host qg301.infusionsoft.com:443 with API Ping.
Ping Succeeded!!
Testing your API Key: by calling WebFormService.getMap.
It Works! Everything is communicating properly and your API Key is correct
It seems as if the Infusionsoft_DataService::ping is failing, which, I presume, happens before the SAK is even attempted via the Infusionsoft_WebFormService::getMap(Infusionsoft_AppPool::getApp?
Did you change anything else on your server? I’m unsure of the type of connection the client attempts to talk to the server (api.infusionsoft.com?)?
Mine is a WP Engine (wordpress) server.
Any insights would be deeply appreciated.
Thanks….troy
From: prelude2a ***@***.***>
Sent: Wednesday, July 17, 2024 5:31 AM
To: novaksolutions/infusionsoft-php-sdk ***@***.***>
Cc: tropsmr2 ***@***.***>; Mention ***@***.***>
Subject: Re: [novaksolutions/infusionsoft-php-sdk] Updates to cater for Keap sunsetting of legacy API keys. (PR #177)
@tropsmr2 <https://github.com/tropsmr2>
testConnectivity.php works for me...
Did you copy the config.sample.php to config.php and fill in your app details and SAK ?
—
Reply to this email directly, view it on GitHub <#177 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BJ2RVIF55HH5KNEJ732PMZ3ZMZPYXAVCNFSM6AAAAABJ5DB5NKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZTGIYDQNRZGU> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@prelude2a
What auth are you running? Oauth2? API Key?
Just want to make sure as I’m getting 401 on connection attempts.
Thanks…troy
From: prelude2a ***@***.***>
Sent: Wednesday, July 17, 2024 5:31 AM
To: novaksolutions/infusionsoft-php-sdk ***@***.***>
Cc: tropsmr2 ***@***.***>; Mention ***@***.***>
Subject: Re: [novaksolutions/infusionsoft-php-sdk] Updates to cater for Keap sunsetting of legacy API keys. (PR #177)
@tropsmr2 <https://github.com/tropsmr2>
testConnectivity.php works for me...
Did you copy the config.sample.php to config.php and fill in your app details and SAK ?
—
Reply to this email directly, view it on GitHub <#177 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BJ2RVIF55HH5KNEJ732PMZ3ZMZPYXAVCNFSM6AAAAABJ5DB5NKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZTGIYDQNRZGU> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@tropsmr2 (I'm using SAK, to answer your previous question) |
Hi @prelude2a…
Thanks so much for having a look at it. Unfortunately, I’m not going to be able to test it for a couple of weeks.
I’ll let you know as soon as I do.
Thanks again!
t
From: prelude2a ***@***.***>
Sent: Wednesday, July 17, 2024 7:12 PM
To: novaksolutions/infusionsoft-php-sdk ***@***.***>
Cc: tropsmr2 ***@***.***>; Mention ***@***.***>
Subject: Re: [novaksolutions/infusionsoft-php-sdk] Updates to cater for Keap sunsetting of legacy API keys. (PR #177)
@tropsmr2 <https://github.com/tropsmr2>
I neglected to merge the commit to the main branch - sorry about that - there were likely some changes missing in your copy of the xmlrpc.inc file. This would mean the headers weren't being added in the xml.
Try downloading the new zip and let me know how you go.
(I'm using SAK, to answer your previous question)
—
Reply to this email directly, view it on GitHub <#177 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BJ2RVIE2THRUI5JE3OQQBX3ZM4P5ZAVCNFSM6AAAAABJ5DB5NKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZVGE2TQOJTGI> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I wanted to say thanks for all the work done here. We were able to splice the changes from the commit into a decade-old CakePHP application and, in the end, were able to migrate it to use service keys instead of legacy keys, and our client is happy. |
@prelude2a - Thanks for doing this. I didn't want to merge this in yet because I needed to still support legacy keys until they are cut off for my own use. I'm not pulling this in verbatim but I've copied and pasted most of your changes into a commit that is coming soon. Again, THANK YOU. Joey |
Welcome! Glad it helped you out :-) |
Thanks! You're very welcome :-) Happy to help. |
This changes the legacy key settings in config.php to allow use of a SAK (Service Access Key) and adds the new X-Keap-Api-Key header in xmlrpc.php.