I wanted to use WhatsApi (https://github.com/mgp25/WhatsAPI-Official).
I followed the instructions about how to register my number and get a password but it did not work out -> it failed with no_routes error.
I also tried to use the built-in examples - registerTool.php and it also failed.
I got this response:
stdClass Object
(
[status] => fail
[reason] => no_routes
[retry_after] => 3600
)
There was a problem trying to request the code.
Do you know if this tool is still active? Am I using it wrong?
Thanks for the help!
My main problem was how to get the Whatsapp password.
I was not able to do that by registering using the documentation mentioned above (I'm still getting 'no_routes') but I was able to get the password and use the API by following the instructions explained in this post: https://github.com/venomous0x/WhatsAPI/issues/983 .
I still don't know what causes the no_routes problem but with the mentioned post - you can skip the registration part and go on to using the tool.
You can download the latest version of WART i am using WART-1.7.3.0.exe it does all the hardwork and send the Password via SMS or call the number you want to use.
Hope this helps
Related
I am trying to make a test transaction using my Laravel 7 app and Authorize.net.
After submitting the sample data, I'm getting:
The element 'createTransactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'clientId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
Anyone know what's causing this error or how to fix it?
Well, I'll answer my own question since it might help others. The problem is the error message in the Authorize.net response is really vague.
Kurt Friars' comment was helpful, since it pointed me in the right direction. As for Mansour Hamcherif's suggestion, the merchantAuthentication object was set in my app, it just didn't have the right values, so it wasn't that.
The solution for me was setting the proper values to setName() and setTransactionKey(). The previous developer who had worked on this project had left values and the credentials had expired. I did a Linux text search for "setTransactionKey", which lead me to the correct PHP file where I need to set:
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
$merchantAuthentication->setName('EnterYourLoginNameHere');
$merchantAuthentication->setTransactionKey('EnterYourTransactionKey');
After that, I cleared all of my Laravel app's caches as well as my browser's caches, did a hard reload, tried a transaction again and it worked! I got:
This transaction has been approved., Transaction ID: **********.
You may want to check the log for the raw request, it's likely the merchantAuthentication object has not been set, if you are using the PHP SDK I recommend checking the SimpleCodeConstants.php file and make sure your merchant credentials constants are set.
For example, if I set my merchant credentials to NULL, I get the same E00003 error as a result of sending the following raw request:
{"createTransactionRequest":{"merchantAuthentication":[],"clientId":"sdk-php-2.0.0-ALPHA", ...}
I'm working on an application in PHP using Google YouTube API.
There seems to be a bug in the commentThreads.list resource.
Even the example code on Google developer site for PHP is broken.
( do they even run these scripts before posting ? :-\ this is the
4th script on their site under their examples that is broken not working code.
I have fixed all the other problems myself, but for some reason every time I try, or use an example script I get error 404 back.
Here is the section of code causing the problem.
// Call the YouTube Data API's commentThreads.list method to retrieve video comment threads.
$videoComments = $youtube->commentThreads->listCommentThreads('snippet', array(
'videoId' => $VIDEO_ID,
'textFormat' => 'plainText',
));
and here is the error it produces.
=================================================
A service error occurred: Error calling PUT https://www.googleapis.com/youtube/v3/commentThreads?part=snippet: (404) The specified comment thread could not be found. Check the value of the <code>id</code> property in the request body to ensure that it is correct.
=================================================
but the $VIDEO_ID is good, and works in the script prior to this block of code.
Why can't the comments list for the video be found ?
This fatal error stops the script.
any suggestions ? thanks in advance.
I'm trying to build a form that uploads videos to my Dailymotion account.
I built the code myself using the documentation, and I got this error:
Fatal error: Uncaught exception 'DailymotionAuthRequiredException'
with message 'Unsufficient scope for `POST /videos', scope required:
manage_videos, write, delete'
I tried using the script here: http://easyscript4u.blogspot.com/2013/05/how-to-upload-video-on-dailymotion.html
And I get the same error. I looked up the error, and it seems as though you need a token. The documentation doesn't say anything about needing this if you have the password, and that tutorial seemed to work for that dude just fine without it.
I'm thinking this may be a new feature they added so it isn't fully documented. My question is just how do I get a token for this type of request(when I have the user password and everything), and where would I plug it in to the linked script?
Thank you for any help you can provide :)
As mentioned in your error, you need the manage_videos, write and delete scopes to be able to upload a video on Dailymotion. This is detailed in http://www.dailymotion.com/doc/api/authentication.html#requesting-extended-permissions : your application needs to request some specific permissions to its user.
Hence, the line you should change in the code you mention is the following:
$api->setGrantType(
Dailymotion::GRANT_TYPE_PASSWORD,
$apiKey,
$apiSecret,
array('write', 'delete', 'manage_videos'),
array('username' => $testUser, 'password' => $testPassword)
);
It should make it work.
Had a look at quite a few posts on stack and the cpanel forum but still cant seem to find a solution.
Im trying to retreive information via an api call but it just always seems to fail. I know its to do with the url 404'ing but not sure how to fix.
I am using the the XMl API class:
https://github.com/CpanelInc/xmlapi-php/
The code I have is:
$this->load->library('xmlapi');
$xmlapi = new xmlapi(XMLAPI_HOST);
$xmlapi->password_auth(CPANEL_USER, CPANEL_PASSWORD);
$xmlapi->set_debug(1);
echo '<pre>';
print_r($xmlapi->accountsummary(CPANEL_USER));
echo '</pre>';
The above outputs the xml array. In the error_notice it says:
HTTP error 404, The requested page was not found.
Thats fine. So I echo out the url it uses which 404's:
http://mysite.co.uk:2082/xml-api/accountsummary
The cpanel docs are a little awkward to navigate but just cant find anything on the actual url structure, besides its the class that compiles the url. ive tried adding www, tried an ip etc but no idea why its erroring.
Also if it helps im accessing a normal cpanel account, not a WHM admin and its through http.
Thanks for reading, any help guidance on getting it working would be appreciated.
The issue you are experiencing is that you are attempting to use the accountsummary function from cPanel ports (2082/2083). The accountsummary function is limited to the administrator accounts since this function is designed to provide administrative api level access for pulling account information from any user on the server.
To access the accountsummary api, you will need to call the accountsummary api from the following url:
https://$SERVER_IP:2087/xml-api/accountsummary?user=$USERNAME
You will need to replace $SERVER_IP and $USERNAME with their respective values.
http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/ShowAccountInformation
I'm getting the following using the PHP client on my server (connecting via FBML). I've included the appropriate php files (facebook etc..)
Fatal error:
Call to undefined method FacebookRestClient::feed_publishUserAction()
in ..../index.php on line 50
I'm trying to use the example given.
Any ideas?
You might want to take a quick browse/grep through your Facebook API files (facebookapi_php5_restlib.php) and make sure that the feed_publishUserAction() method exists. Perhaps you're using an older version of the API library?
OMG I found the answer
Because the facebookapi_php5_restlib.php that facebook.com provided you is a piece of outdated shit
i.e. you won't be able to find the word feed_publishUserAction in the facebookapi_php5_restlib.php file
HOWEVER, the official facebook smiley demo from this facebook wiki page , contained a more completed facebookapi_php5_restlib.php , along with the feed_publishUserAction function
Which finger would you like to show to the facebook developer staffs?