I have been following the webhook setup on Facebook Developer:
https://developers.facebook.com/docs/messenger-platform/getting-started/webhook-setup
I have been deploying my index.js file on a heroku server and all it says is error, cannot get (reference link here)... error on application server
Other than my unique token I have not changed anything and in fact the heroku logs show that the events are being registered (reference link here) heroku logs
Would really appreciate some help on understanding how I can get rid of this error webpage so I can use this app link as my callback URL for messenger chatbot.
you need to add a route pointing to '/' in your app
app.get('/', (request, response) => {
return response.send('Ping!');
});
Related
learning MERN stack . When i try to run my google OAuth from my localhost ,it works completely fine. but when i try to run it from link of my web-app provided by railway (production environment) gives me following error: { Access blocked: This app’s request is invalid. You can’t sign in because this app sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error
If you are a developer of this app, see error details.
Error 400: redirect_uri_mismatch }
i was expecting as it runs smoothly through my localhost, also work from production environment
I have implemented sending messages to 'x' email but it only works locally, when I upload the application made with node to Heroku, it just doesn't work. It gives me the following error:
Error: Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv 534-5.7.14 e9HX3y6V25UV6hUh4uM4_rUhqSJ3ujq_xOjNl9kD-IALUNl8WClFdfvFA9ulKc-aFFeOR 534-5.7.14 JG4Zn8OAvx_UrM6eTIKC__q5mC4CvVA2Sk9EfcE6Jjgkede_bb5lehLQUM242Gcs> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 z4-20020ac84544000000b002f39b99f69esm161549qtn.56 - gsmtp
I have the app deployed at the following address https://multiservicios-espay-dashboard.herokuapp.com/ .In the /auth/register route, it is where the users are created, when a user is created, it sends a confirmation by email. It is right there where the application fails, I want to know why it fails on Heroku but on localhost it works correctly.
It is in Spanish because it is my native language but I would like you to try the creation of users so that they can observe the error that I get. I don't know how to fix it, I would really appreciate your help.
This is my nodemailer config:
const nodemailer = require("nodemailer");
const smtpTransport = require('nodemailer-smtp-transport');
const smtp = smtpTransport({
service: 'gmail',
host: 'smtp.gmail.com',
auth: {
user: 'multiserv.spaky.contacto#gmail.com',
pass: '***********',
}
})
const transport = nodemailer.createTransport(smtp);
module.exports = transport
You should use the gmail service for testing only , after some time it will stop working (it was timeout error on my case) . when you deploy the app try to use other production services like mailchimp and postmark.
The integration can be done easily with superface sdk instead of nodemailer.
first install the package with npm install #superfaceai/one-sdk
then follow the steps below https://superface.ai/communication/send-email
I am attempting to call a URI with my Slack slash command but I get the error:
https://pubsub.pubnub.com/v1/blocks/sub-key/sub-c-redacted/mypath
Darn - that slash command didn't work (error message: `404_client_error`). Manage the command at Freshdesk Field Update.
The URI I am trying to call works when I curl it (POST and GET) or just paste it in my browser address.
So I tried a webhook.site URI and it worked fine in the same slash command
https://webhook.site/404279dd-369b-4224-8672-94fa5c0a826c
And this works just fine. Unsure of why the PubNub URI is failing.
Unsure of why the error was occurring but seemed to have something to do with my PubNub Admin Dashboard account. I deleted it and created a new one and it started working with the new function in a new key set in a new account.
If anyone knows actual root cause (perhaps more generic issue than just PubNub account), please provide and I will review and approve as answer if I can verify it.
But for now, my answer is, try creating a new PubNub account.
You have to add template mapping in api gate way. In the integration section you can add it. So that the request from slack will properly map to json.
Find examples here : here and here.
I was also getting the same error, when I was using localhost as the url but after I deployed the server, where slack sends the post request to now and got the url from there. the error is gone.
I am deploying an app on Heroku that uses Google OAuth2. When I test the app, I go to the auth url (/auth/google) and I see the following error message (note that I replaced domain name with *** just for posting here:
That’s an error.
Error: invalid_client
The OAuth client was not found.
Request Details response_type=code
redirect_uri=https://****.com/auth/google/callback scope=profile email
client_id=process.env.GOOGLE_CLIENT_ID That’s all we know.
I have looked at the following questions before posting and have been trying to debug for several hours:
Error: invalid_client with Google Apps API OAuth2
invalid_client in google oauth2
I have tried to do the following:
Ensure there are no spaces before and after the values in Heroku
The consent screen in Google Console has the name and email address completed
I have renamed the app within Google Console
I have deleted the key/value from Heroku and re-created
Despite all this, I am unable to fix this. Any ideas on what I maybe missing?
The answer is in the question.
Google can't find any reference to your client, which is identified by the client_id in the URL. Instead of a valid client_id (which looks something like "40740878192.apps.googleusercontent.com") you have given a client_id of "process.env.GOOGLE_CLIENT_ID". It looks like a bug in your code that instead of using process.env.GOOGLE_CLIENT_ID as a variable, you have used it as a literal.
We have a web application with Google calendar API using OAuth 2.0 client IDs.
The problem is that it works well with the Test app:
http://test.our-domain.com
BUT it doesn't work in the production that has SSL.:
https://app.ourdomain.com
Both are on the same server and on the same domain,
Both are authorized in the Credentials page as
http://test.our-domain.com/callback
and
https://app.ourdomain.com/callback
When the user sign in it looks like the process is OK but the Token does not being saved.
Here is the error we have on the production log - Please help...
2017-11-23 22:49:56,656 [ 33] ERROR DotNetOpenAuth.Http
- WebException from https://accounts.google.com/o/oauth2/token: { "error" : "redirect_uri_mismatch" }
2017-11-23 22:49:56,656 [ 33] ERROR
Client.Management.UserCalendarEntryController
- Failed to get google authenticator for XXXXXXXXXXXXXXXXXX
Blockquote
As referred with this thread, the redirect URI (where the response is returned to) has to be registered in the APIs console, and the error is indicating that you haven't done that, or haven't done it correctly.
Go to the console for your project and look under API Access. You should see your client ID & secret there, along with a list of redirect URIs. If the URI you want isn't listed, click edit settings and add the URI to the list.
Also, be noted that updating the google api console can take some time. Generally only a few minutes but sometimes it seems longer.
(I found your post on xplace, I don't have an account there) - I can help you debug the issue if you'd like. feel free to leave your email and I'll reach out.