Why is my Cloudflare AppService failing to Oauth? - cloudflare-apps

I’m having an issue completing the OAuth process for our Cloudflare app that's in development.
I've been following the documentation here https://www.cloudflare.com/apps/developer/docs/webhooks/managing-accounts and I'm stuck in #10 in the list, which is #9 in the flow chart.
My server is returning the following
content-type: application/json
response
{
"token": “eXamPleTokeEn12",
"type": "Bearer",
"expiration": "2020-08-18T00:13:37.109Z"
}
Which is what the documentation is telling me to do, so I don’t understand why it’s not working.
If you could help me figure this out so I can submit our app for certification that would be great.
Here's the error I'm getting:
A communication error occurred while contacting this app’s web
service. Some functionality may not work correctly. While some
communication issues automatically resolve themselves, we’ve notified
the app developer that this has error occured. Please contact us if
you continue to see this message.
Any help is greatly appreciated,
Thank you!

Related

Fyers, API Failed - Could not authenticate the user

"message": "Could not authenticate the user"
I was trying to get user details from fyers.
Try generating a new Fyers access token. Most likely, your issue will be resolved.
If problem still persists, post in Fyers Community. They might be able to help you in a better way.
https://community.fyers.in/

Using service accounts and oauth2 to call autoML Google API

I've trained an image classification model using autoML API and now I would like to create a JAVA program that makes predictions of given images using that model. As mentioned in the docs, this API requires the OAuth scope: https://www.googleapis.com/auth/cloud-platform.
I don't need the user to login since I will not use any private data, so I decided to use service accounts and followed the steps in OAuth2 for service accounts to generate an access token.
The process goes well and I receive the reponse:
{"access_token": "access_token_string", "expires_in": 3600, "token_type": "Bearer"}
Then, I go back to send the post request for autoML prediction, and set the header "Authorization" to "Bearer access_token_string".
I have the error message
{"error":
{
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}
I know that the prediction request is correct because I've tried it using an accessToken generated for web apps (just wanted to test).
So the problem is in the authorization part, I've checked that my service account have all the required permissions as well. I d'ont know where the problem is exactly, does anyone have an idea?
So since there are no answers, I contacted the Google Support Service, they told me that the below requests are correct, the problem is in allowing the service account to access my GCP project resources. This step is explained here
I've already went through this step but I should have missed something the first time, so I deleted the service account and restarted all the steps, it's working now!
I hope this will help someone :)

Book a cab on my behalf, the code is not production ready, how to proceed then?

I am trying to do an auto-booking of a cab from my code for uber, only for me.
I have my clientID, client Secret and Access Token. How to use them so that i can fire a request and monitor the status whether has been booked or not? Or if no cabs are available it would retry at specific intervals unless a cab gets booked.
Please guide me.
In the meantime while i am trying to fire a v1/me, i am getting 401 Unauthorized.
Did you try following the Authentication tutorial to understand if the requests you fire are as expected?
Also, you're getting down voted because there is code or anything that would enable us to help you debug this issue. If the hints in the tutorial do not help, please provide more details on the headers you add. You need to have the authorization header: Authorization: Bearer <YOUR_ACCESS_TOKEN> with a valid access_token.

HTTP 500 error when logging in facebook on web or mobile

I have been getting this error message the past 36 hours. Facebook support has not been any help at all when it comes to resolving this issue. I've cleared my cookies and cache multiple times. I've tried from multiple machines as well as my phone. Still no luck on logging in. Is it an error on my part or are they doing maintenance? Please assist, I did not want to have to post here but I have no more options...
The website cannot display the page
HTTP 500
Most likely causes:
•The website is under maintenance.
•The website has a programming error.
What you can try:
Refresh the page.
Go back to the previous page.
More information
This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.
For more information about HTTP errors, see Help.
It's probably something on their end. Responses with a 5xx status code are used when the server is aware it has erred in some way. More specifically, the 500 error has the following definition:
500 Internal Server Error:
The server encountered an unexpected condition which prevented it from
fulfilling the request.
If the response had a 4xx status code, then the fault would lie on you. For example, if you made a request to a resource that doesn't exist, then you'd get a 404 response. As it stands now, something is wrong with their server.
Had the same problem. It appeared to be caused by this:
https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.1#asking-for-permissions
Apps that ask for more than public_profile, email and user_friends must be reviewed by Facebook before they can be made available to the general public.
We were asking for more than the default, so I presume the 500 is caused by this lack of review.
It appears it can also happen if you haven't made your App public and try to login to it as anyone but you (the account that created the App).

Error when reading from mailbox

My application, created today, runs fine when I use it with my account. On any other account however, the following error is sent back as a response:
message: "(#298) You must be a developer of the application"
type: "OAuthException"
The exact code I'm using to send the request is this:
FB.api('/me/threads', {limit: 1000}, function(response){ ....
I have found someone experiencing the same problem, but the response he accepted didn't really provide any useful information. ( Reading over inbox, I get error #298).
Anyone have a clue on how to solve this? Would be greatly appreciated!
I'm guessing you have the read_mailbox permission?
Try accessing the /me/inbox connection instead?
Facebook tells you (from http://developers.facebook.com/docs/reference/api/thread/):
Please note: We are in the process of making the new messages system
available to all users, at which point this API will replace the
/inbox/ Graph API endpoint. We are providing early access to this API
for registered developer accounts only until the new messaging system
is broadly available. You should use the /inbox endpoint for
production applications at the current time.
That is, only the current apps developers will be able to use the threads-connection for now (but it will be available later).
It looks like your other account doesn't have a developer license/flag/attribute, thus failing the authentication check.