Help me please. Now i'm playing around Botman Studio in Larvel. I'm using cod from example. It works great with web interface. I want use it with Telegram. I install drivers, get token. When i try to get registration this way:
"php artisan botman:telegram:register"
It gets error:
ErrorException : file_get_contents(https://api.telegram.org/bot/setWebhook?url=https://83255e3c.ngrok.io/botman): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
Web interface work well with https://83255e3c.ngrok.io/botman/tinker (it use same webhook).
I register webhook on telegram this way:
curl -d "url=https://83255e3c.ngrok.io/botman" "https://api.telegram.org/bot524662111:AAF3syuVVVVVVVVV35Goh4lR6pxx1yLY/setWebhook"
Telegram told me Ok.
Now i send message to bot using telegram.
I see in ngrok's logo it comes as well as from webinteface, but bot doesn't reply. And he does work well wen i send message through web.
Help me please and sorry for my english. I will study hard. I promise.
In the error message you can see, that the YOUR-TELEGRAM-TOKEN didn't set.
The link should be like:
https://api.telegram.org/bot<YOUR-TELEGRAM-TOKEN>/setWebhook?url=https://83255e3c.ngrok.io/botman
Try set token on configuration:
you can find the configuration file located under config/botman/telegram.php
You can find it in the official documentation https://botman.io/2.0/driver-telegram
write below code in .env file:
TELEGRAM_TOKEN=telegram bot token here
Related
I am using wp-api-v2 and Basic Auth plugin to add post to my wordpress. it work nice in my local wamp server but wen i upload my code on online server my credential not working and prevent me to aading new post by this error:
"Sorry, you are not allowed to create new posts."
I add my credential by putting this key/value pair to my request header:
key=>"Authorization",
value=>"Basic ".base64_encode($username.":".$password)
is there any Possibility for misconfiguration or problem in my server?
I finally found solution in this link and resolve my problem.
I've been working with the Mirror API, specifically the php quick start project. I'm receiving an error after attempting to subscribe to timeline updates:
An error occurred: Error calling POST https://www.googleapis.com/mirror/v1/subscriptions: (400) callbackUrl must be a valid HTTPS URL
I do have SSL enabled and working on my test server.
In the subscribe_to_notifications function on mirror-client.php (line 111) I see a reference to the callbackUrl: $subscription->setCallbackUrl($callback_url);
However, I am not able to find where to change this. Should it be set to notify.php? Can someone get me pointed in the right direction?
Found out the issue, in config.php my $base_url needed to be set to the secure version.
My live, staging and localhost had a page where it had a map and store finder.
6 months down the line this now does not work and havent touched the code. I have renewed my API key and still no luck. Now i know the API V2 is now not in use and im wondering if i am using the wrong code (confused myself). In my store finder i have this url:
$url = "http://maps.google.co.uk/maps/geo?q=".urlencode($this->input->post('postcode'))."&output=json&key=MYKEY";
Now reading this page ( https://developers.google.com/maps/documentation/geocoding/#JSON ) this has changed but i just cant seem to get a valid url working!
The error i get is: Message: file_get_contents(http://maps.google.co.uk/maps/geo?q=sr3+4as&output=json&key=MYKEY): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
And when i type the url string into google i get this message:
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
If someone can guide me to if my url string is wrong above OR if this is another issue i would appreciate it.
Thanks!
According to the upgrade guide this endpoint URL:
http://maps.google.co.uk/maps/geo
Is using the v2 geocoding API.
Developers switching from v2 may be using a legacy hostname — either maps.google.com, or maps-api-ssl.google.com if
using SSL. You should migrate to the new hostname: maps.googleapis.com.
This URL based on the information in the update guide works for me:
http://maps.googleapis.com/maps/api/geocode/json?address=nebraska&sensor=false
I m new to use of facebook api after some googling i found facebook api from this link:
https://github.com/facebook/facebook-php-sdk
after download this package i try to execute example code from this package but it returns an error like:
Fatal error: Uncaught CurlException: 6: Could not resolve host: graph.facebook.com; Host not found thrown in D:\xampp\htdocs\testing\phpdemo\fb\src\base_facebook.php on line 994
to solve this problem i try too much googling but i doesnt get positive result from there.
If anybody know what kind of possibilities for this problem then please help.
here is may be two posibilities like:
1) Do you have any firewalls? The problem is not about configuration is just CURL can't do requests to graph.facebook.com and possible any website. Try disable any firewalls that may be blocking your CURL requests
2) From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it. Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data.
You can get help here,https://stackoverflow.com/questions/16294630
From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it.
Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data.
I have the TwitterOAuth class and demonstration running on a local development server and I cannot get it to authorize. I have entered the new CONSUMER_KEY and CONSUMER_SECRET in the config.php. I have also synced the server time to NTP. I get the error message: 'Could not connect to Twitter. Refresh the page or try again later.'
var_dump($connection->http_code);
results:
int 0
ANY help or advise would be appreciated.
I am running PHP 5.3
When I try to ping the api server I can't.
C:\Users\Owner>ping api.twitter.com
Ping request could not find host api.twitter.com. Please check the name and try
again.
could this be the problem ?
I had some issues with this process as well. I don't exactly recall what resolved this error, but I followed This Tutorial (albeit a bit out of date) and made sure I explicitly set the callback URL in the twitter panel for my app. Also, and I believe this one also caused the int 0 return for me, make sure that if you are going with a hosting provider they allow CURL requests.
step 1: https://apps.twitter.com/app or go to your app setting
step 2: Unchecked the (Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)) This box..
save and exit and check..
ThankYou..!