Closed thomaspuppe closed 11 years ago
This is funny ... I compared the code to an old version of the Wrapper (CS_REST_Wrapper v2.4.0) that I use in another project and that also talks to the CampaignMonitor API v3. This version does not base64_encode the credentials (apikey:nopass). So I changed
'credentials' => base64_encode($api_key.':nopass'),
to
'credentials' => $api_key.':nopass',
in function CS_REST_Wrapper_Base (createsend-php-master\class\base_classes.php line 147).
And now it works. Can anyone explain this to me? Has anyone else discovered problems with atuhentication? Or is anyone here who uses the wrapper successfully without this modification?
I just have found out that it was my error, and found out what the reason was.
If I just did 3 instead of all the other stuff, it would have been fine.
Sorry for the confusion.
When I want to add Subscribers toi the CampaignMonitor API using this wrapper, I get the following reponse:
https://www.campaignmonitor.com/forums/topic/5711/must-supply-a-valid-http-basic-authorization-header-classic-asp/ says that the Auth Header must be base46 encoded. But this is already the case in your CS_REST_SocketTransport class (/class/transport.php).