Facebook Real-time Updates: (#2200) callback verification failed, code 2200 - facebook

I am trying to get realtime updates from facebook for my application as documented in https://developers.facebook.com/docs/reference/api/realtime/. I am struggling now when it comes back to the Subscription Verification. I have set up a callback server which accepts both GET and POST requests. I verified that the server works by making curl requests to it.
However, I stil get this error when attempting to create a subscription issuing the POSt request below
{"error":{"message":"(#2200) callback verification failed:
","type":"OAuthException","code":2200}
From what I read in the documentation and other threads, I assume that this means that the single GET request to my callback URL fails. The callback url does not get requested by neither GET nor POST requests indeed. I suppose that facebook is somehow blocked from accessing the endpoint. However, I am able to auth as a user using the auth dialog (https://developers.facebook.com/docs/reference/dialogs/oauth/) where I pass a callback url on the same server as well. The server runs http (for now).
This is the curl I am using to post the subscription. Host file has an entry to redirect dev.minggler.com to localhost =>( 127.0.0.1 dev.minggler.com)
curl -XPOST 'https://graph.facebook.com/256139341164822/subscriptions?callback_url=http%3A%2F%2Fdev.minggler.com%3A3000%2Ffacebook%2Frealtimeupdates&object=user&fields=friends&verify_token=abcd123&access_token=$MYTOKEN'
Can anybody help me out on this?

finally found the problem. the server wasn't reachable from outside. resolving it solved the problem

Related

Why does the PayPal API not recognize my client id and secret

The Paypal API doesn't recognize my Client ID and Secret I got from https://developer.paypal.com/developer/applications/
I wanted to include a server side checkout according to this tutorial https://developer.paypal.com/docs/archive/checkout/how-to/server-integration/
When I do the request to https://api-m.paypal.com/v1/payments/payment I always get a 401 Error with the message "Authentication failed due to invalid authentication credentials or a missing Authorization header.".
I checked multiple times if my credentials were correctly included into the request. I also tested the endpoint in my server environment and as well via Postman.
I also tried the route https://api-m.sandbox.paypal.com/v1/oauth2/token to exchange my credentials with an access token and got the same problem.
I also tried to create multiple Sandbox and Live Accounts and always got the same error.
Has anyone an idea what the problem could be?
There are two separate issues here.
You first need to use /v1/oauth2/token to obtain an access token, and then use that access token to call any of the other actual APIs.
The credentials you obtain from PayPal Developer will be for either "Sandbox", or "Live". Make sure you choose the correct tab (sandbox, for development). Sandbox credentials will only work for api-m.sandbox.paypal.com , and Live credentials will only work for api-m.paypal.com . The two environments are completely separate.
If you still have issues, post the SANDBOX client ID and secret you are using, and the full request and response to the api-m.sandbox.paypal.com endpoint. There should be a PayPal-Debug-Id in any error response, in the headers if nowhere else.

'request hooks' for Owasp ZAP

Is there a way I can trigger some action once a particular request is issued in ZAP?
For example, I want to send a POST request to an endpoint whenever there is a login/logout request.
Environment: I'm using a ZAP docker image.
Your best option is to use an HTTP Sender script - that will get invoked on every request and response sent or proxied through ZAP. You can test for your login/logout request and then send you POST request.
To add scripts to ZAP from the command line see this FAQ.

Trying to use skype interviews api, but not working & hitting an error as 502

While running curl to make http post request to skype interviews api, it is hitting an error as 502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the conerror in command linetent server.
I am running a command as "curl http://interviews.skype.com/api/interviews -H 'skype-apikey: my api key' -d {}".
By searching, many suggested to check that both IIS versions must be matched, and increase the ARR timeout to 60/120 secs in IIS. Both are not working for this.
Can anyone help me out in using the skype interviews api for performing internal communication like text/audio/video chat, sharing files/screen by any text or video tutorial. Help will be appreciated. Thanx in advance.
Step 1: I have implemented skype interviews API in NodeJs.
First Get your API key and secret:
Step 2: After that create API_KEY and API_SECRET environment variables in the .env file and assign values to them which we got from step 1.
Step 3: Follow the following link for source code to hit skype interviews API endpoint
https://gist.github.com/RajuS1ngh/8729fd8f047a20eed0fe1271c982d122

JMeter test with CAS not redirect to service

I am doing a jmeter test with CAS , but encountered a problem.
I got it logged in succesfully with full of CAS parameters(username/password/lt/service/_eventId), but the response data was not my page specified in the parameter "service".
It is not redirected.
Why? Does anyone know this issue?
I admit that I am not so familiar with CAS...
After reading the protocol of CAS, I find this:
(from http://www.jasig.org/cas/protocol)
2.2.4. response
One of the following responses MUST be provided by /login when it is operating as a credential acceptor.
successful login: redirect the client to the URL specified by the "service" parameter in a manner that will not cause the client's credentials to be forwarded to the service. This redirection MUST result in the client issuing a GET request to the service. The request MUST include a valid service ticket, passed as the HTTP request parameter, "ticket". See Appendix B for more information. If "service" was not specified, CAS MUST display a message notifying the client that it has successfully initiated a single sign-on session.
So ,I add a new request using GET with two parameters:service, ticket(its value is the same with lt).
Then the script run successfully and finally redirected..

Facebook [function.file-get-contents]: failed to open

I am geting function.file-get-contents failed to open when i try to connect with server , my server fails to connect ,same application work in all server but in my server i am getting this error , Any solution , is that server CONFIG Issue ..
YOU CAN CHECK SERVER Config here http://gomandi.com/phpinfo.php
In the last few days I saw a few complaints about file_get_contents not working well when trying to access facebook api using it.
Take a look at these threads:
Getting 404 Error from Facebook Graph API
Facebook Auth with high traffic sites: empty access tokens, empty /me
Facebook API 400 Bad Request
You might find out what's wrong there. I suggest that you try to use something other than file_get_contents, such as curl, which was suggested in those threads as well (along side some code snippets)