veda-consulting / org.civicrm.sms.clickatell

Clickatell integration allows delivering short message service (SMS) messages through its Clickatell Gateway to mobile phone users.
1 stars 15 forks source link

Following v4 upgrade get api url error #18

Closed jorich-2000 closed 6 years ago

jorich-2000 commented 7 years ago

Following upgrade of extension messages fail to send - all url settings appear to be correct Api error the requested url returned error:404 not found - code 22 6e98efab-e0c7-4476-af2b-f3210dbb924e

PHP version 5.6.31 CiviCRM 4.7.23. Joomla 3.6.4

clarkac1 commented 6 years ago

Same here, and the problem is that Civi flags the SMSs as having been successfully sent. In reality and on Clickatell's website, nothing has been sent, so not good. Had to revert to 3.0 extension. Andy Clark

hamboneZA commented 6 years ago

@veda-consulting This issue persists. Any pointers on a fix before I revert to a previous version?

veda-consulting commented 6 years ago

@hamboneZA we're due to take a look this week.

jorich-2000 commented 6 years ago

Any news on this - would really like a fix so we can start sending messages again

hamboneZA commented 6 years ago

@veda-consulting Did you mange to take a look or push a new version out? Folk are starting to get worked up about the SMS functionality appearing to work, but none actually going out. I've removed the Clickatell provider for now, but would ideally like up again.

jorich-2000 commented 6 years ago

Is there any progress on this error please - I dont really want to ditch clickatell as a provider but may have to move to something different. Reverting to V3 has not helped as it is only sending intermittently.

gmaidau commented 6 years ago

We are having exactly the same issue. Would love a resolution, please.

jorich-2000 commented 6 years ago

Any news on this - it’s been 6 months! The extension is still listed in the extension catalog as 'stable' and in user documentation as broken on civi 4.6 - we really would like someone to respond - even if Just to say you are no longer developing it. Is this just an upgrade problem or are all new installs broken too?

clarkac1 commented 6 years ago

jorich & gmaidau & hambone - switch to Twilio! The Twilio extension works perfectly, website is much easier to use, and they have a program which gives some non profits a $500 credit & 25% discount.

jorich-2000 commented 6 years ago

Other than having credit already on Clickatell, short codes registered and a return number that would be an option 😕

hamboneZA commented 6 years ago

@clarkac1 Thanks for the tip. However Twilio is not a viable option in South Africa. I have migrated back to V3 and have not had any issues sending nor with the callback.

veda-consulting commented 6 years ago

@jorich-2000 sorry about the delay here, we're maintaining this on a pro bono basis hence it keeps getting bumped. I do have some resource available now and we're taking a closer look at the issues.

jorich-2000 commented 6 years ago

Thanks for this - strangely I am today starting to install a local Linux server that I was planning to start trying to debug the app on. Let me know if you want me to test anything

On 14 Mar 2018, at 15:48, Parvez Saleh notifications@github.com wrote:

@jorich-2000 sorry about the delay here, we're maintaining this on a pro bono basis hence it keeps getting bumped. I do have some resource available now and we're taking a closer look at the issues.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

veda-consulting commented 6 years ago

@jorich-2000 we've installed a clean version and its all working as expected on 4.7.23. We're also trying an upgrade to see if that reproduces the issue. Could you let us know how you upgraded the plugin? Was it using the automated upgrade links or do you manually download and upgrade?

veda-consulting commented 6 years ago

@gmaidau if you could also provide information about how you upgraded the extension that would be useful.

jorich-2000 commented 6 years ago

It was via the automated upgrade links. I have wondered if it is something to do with the version of clickatell api - we have been registered for many years. I wonder if I created a new account if it would work differently - no idea if that makes any sense...

On 15 Mar 2018, at 18:13, Parvez Saleh notifications@github.com wrote:

@jorich-2000 we've installed a clean version and its all working as expected on 4.7.23. We're also trying an upgrade to see if that reproduces the issue. Could you let us know how you upgraded the plugin? Was it using the automated upgrade links or do you manually download and upgrade?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

veda-consulting commented 6 years ago

@jorich-2000 ok yes, it does Can you share the URL you have set in your settings?

veda-consulting commented 6 years ago

Closed by mistake!

gmaidau commented 6 years ago

Yes, we are the same as @jorich-2000 , automatic upgrade. We have also had the Clickatell account for some time. We use this URL: http://api.clickatell.com Testing manually by entering the string in a browser address bar, using the example in the Clickatell account API settings, works fine.

jorich-2000 commented 6 years ago

https://api.clickatell.com

On 15 Mar 2018, at 18:51, Parvez Saleh notifications@github.com wrote:

@jorich-2000 ok yes, it does Can you share the URL you have set in your settings?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

veda-consulting commented 6 years ago

@jorich-2000 @gmaidau and in the additional settings can you tell me what you have? i.e. api_key=

gmaidau commented 6 years ago

api_id=3571217 from=61123456789

jorich-2000 commented 6 years ago

api_id=3506745 from=NLCBanham

veda-consulting commented 6 years ago

@jorich-2000 @gmaidau thanks, we're still not able to reproduce the issue - we'll try including the 'from' and feedback

veda-consulting commented 6 years ago

@jorich-2000 @gmaidau we're pretty sure this is down to the from param Could you test it without the from set - we dont have a two way number so we're not able to test. If it works you need to ensure the from param also works in the URL prior to trying it in the extension. You should see how to test your API key from the Clickatell account page.

It will be something like

http://api.clickatell.com/http/sendmsg?user=USERNAME&password=PASSWORD&api_id=5644777&to=447424772955&from=123456&text=Message

Once you've run this can you let us know, we will then ensure the READ ME is up to data and look at a way of checking the from if possible - dont think theres any way in the Clickatell APIs to do it but we'll check once you guys feedback.

jorich-2000 commented 6 years ago

@veda-consulting I have tried both without the 'from' parameter and with it as api-id=xxxxxxx&from=xxxxxxxx. Neither work on either of two sites tested (both Joomla) it still returns

API Error Error: "The requested URL returned error: 404 Not Found" - Code: 22

Using url direct in a browser as below works fine for both my sites api_id's and from parameters http://api.clickatell.com/http/sendmsg?user=USERNAME&password=XXXXXXXXX&api_id=1234567&to=441234567890&from=NLCBanham&text=test%20message%20from%20url

veda-consulting commented 6 years ago

@jorich-2000 ok, we're till investigating. Will feedback once we've identified the issue.

gmaidau commented 6 years ago

Sorry for the delay in responding. I have just tested again, removing the from param. Same results as @hamboneZA API error coming up, and no message sent. Sending directly from the browser, with the from param included works fine.

veda-consulting commented 6 years ago

@gmaidau thanks for the info, we're still on it.

jorich-2000 commented 6 years ago

@veda-consulting I have been doing some more digging - having setup a separate Linux machine and debugged the code.

Important - Clickatell has two api interfaces:

SMS Platform - For accounts created November 2016 onwards. Access the new Clickatell communications platform for message sending.

Communicator / Central - For Clickatell accounts created prior to November 2016. Access APIs integrations for Developer Central.

Based on this there are two completely separate sets of api calls. The V4 'upgrade' removed all support for the old api and replaced it with the new one - V4 will never work if you have a pre 2016 account!. Capturing the url parameters shows this to be the case when the account is a pre 2016 one

Wrong... http://api.clickatell.com/messages/http/send?to=447123456789&content=Message&callback=3&apiKey=1234567==

Right... http://api.clickatell.com/http/sendmsg?user=xxxxxxxxx&password=yyyyyyyyy&api_id=1234567&to=447123456789&text=Message

After disabling the v4 extension and copying v3 files back over and resetting all usernames and password on the api at the Clickatell end I have managed to get this version working

Suggestion: Have two completely separate Clickatell api products - rename the V3 code as Clickatell-Central and V4 as Clickatell-Platform and dont suggest upgrades from one to the other

JohnFF commented 6 years ago

I had a different suggestion - one extension that uses different calls depending on the API key it finds. I also recommend using standards compliant code, unit tests, api key validation, and pop up messages!

deepak-srivastava commented 6 years ago

Update: latest release v4.1 makes extension backward compatible, based on api url being used.

Assumption: API url for (v3 / old accounts) is "https://api.clickatell.com" While for v4 it's - "https://platform.clickatell.com".

Any PRs for any further improvements - most welcome. Thanks.

hamboneZA commented 6 years ago

This works again - thanks for the effort to get it resolved all.

gmaidau commented 6 years ago

Likewise. Thank you so much for getting this sorted. A fantastic result.

Cheers, Geoff.

On Fri, May 11, 2018 at 1:01 AM, hamboneZA notifications@github.com wrote:

This works again - thanks for the effort to get it resolved all.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/veda-consulting/org.civicrm.sms.clickatell/issues/18#issuecomment-388080638, or mute the thread https://github.com/notifications/unsubscribe-auth/AjOqM5Fo0cPmUwNoyHJP1Z0IRTFd3z7Jks5txFZagaJpZM4P9UAp .

-- http://www.geoffadams.net http://www.facebook.com/geoffadams.net

ph. 0427 328 483

veda-consulting commented 6 years ago

@jorich-2000 if you could also confirm its working for you that would be great. It took a lot of digging around to find the issue and to be honest its a very poor way of doing the upgrade of keys by Clickatell but we're there now with a backward compatible extension. Closing for now, assuming we're all good.

jorich-2000 commented 6 years ago

will check as soon as i get a chance Regards, Jonathan Richardson ------------------------------------------------------------------ CONFIDENTIALITY NOTICE The information in this e-mail message may be confidential and for use of only the named recipient. If you are not the intended recipient the retention, dissemination, distribution or copying of this e-mail message is strictly prohibited.

  From: Parvez Saleh <notifications@github.com>

To: veda-consulting/org.civicrm.sms.clickatell org.civicrm.sms.clickatell@noreply.github.com Cc: Jonathan Richardson jonathan.richardson@oldskoolhouse.co.uk; Mention mention@noreply.github.com Sent: Friday, 18 May 2018, 15:09 Subject: Re: [veda-consulting/org.civicrm.sms.clickatell] Following v4 upgrade get api url error (#18)

@jorich-2000 if you could also confirm its working for you that would be great. It took a lot of digging around to find the issue and to be honest its a very poor way of doing the upgrade of keys by Clickatell but we're there now with a backward compatible extension. Closing for now, assuming we're all good.— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

marcusjwilson commented 2 years ago

Is this extension still supported? With CiviCRM 5.44, new Clickatell account and v2.1 of the extension, we just see the following when trying to relay SMS messages:

"API Error: The requested URL returned error: 400 - Code: 22"

What is the status of this extension now?

Thanks Marcus