My working Foursquare api stopped working, failing consumer disabled [duplicate] - api

I recently started using the foursquare API, but suddenly I get "Consumer disabled" error responses.
So far, the only API call I've been doing is one to browse some venues:
https://api.foursquare.com/v2/venues/search?ll=51.222816,3.224778&query=Friet&radius=200&limit=10&categoryId=4d4b7105d754a06374d81259&client_id=app_id&client_secret=app_secret&v=20161116
These are the parameters I am sending:
ll:51.222816,3.224778
query:Friet
radius:200
limit:10
categoryId:4d4b7105d754a06374d81259
client_id:app_id
client_secret:app_secret
v:20161116
At first everything went well, then I started working on some other part and now I'm back to foursquare and getting the following response (with 403 http status code):
{
"meta": {
"code": 403,
"errorType": "not_authorized",
"errorDetail": "Consumer disabled."
},
"response": {}
}
I've searched my emails, but I didn't recieve any warnings or notifications on why this might be happening. Anyone had any experience with this?
One thing that may be of importance: Since I'm in development and there is no site for the project yet I can not provide a privacy policy url in the app settings. Because there is none, yet.
Edit: this is my client ID: 1VXNUT53J2OMMTMKA4E3UBKYLQQCI1GC3CRCCBPSQK1BWQFG

try resetting your API secret at (https://foursquare.com/developers/app/CLIENT_ID/reset)
That error could happen if there's suspicious behavior on an API key - but you would've gotten an email first.
Update: I see this key flagged as disabled. I re-enabled so should be working now. I'll run through the logs and try to figure out how/why this happened.

Related

Can't access Chorus Pro API in Postman

I'm working on a custom module for Odoo 15, but I'm currently facing an issue with the Chorus Pro API.
Everything about authentication and API key generation looks ok on their website.
But when I try some requests in Postman it always returns me "400 Bad Request" and I don't understand why.
Can someone help me ?
Thanks.
Update 1
Ok so after several tests it return me "Unable to find token in the message".
But I specified it in the Authorization menu with type API Key.
Here the official documentation: https://developer.aife.economie.gouv.fr/index.php?option=com_apiportal&view=apitester&usage=api&apitab=tests&apiName=Factures&apiId=5feff6ae-09cd-46a6-a0b9-844eac6b9acc&managerId=2&type=rest&apiVersion=1.0.0&Itemid=265&swaggerVersion=2.0&lang=fr
(Sorry it's in french)
Update 2
I finally get an API Key and change the Authorization Type to Bearer Token so the previous error is solved.
But now I've got "403 Forbidden" because of an "[invalid field]".
I use this POST URL : https://sandbox-api.piste.gouv.fr/cpro/factures/v1/corriger/valideur/facture
With this body :
{ "idFacture": 0, "idStructure": 0, "typeIdentifiantStructure":
"SIRET", "identifiantStructure": "string" }
Update 3
The "[invalid field]" seems to be the host one, but it's the same as in the POST URL : sandbox-api.piste.gouv.fr

Flutter Google Sign In Couchbase Authentication Code Flow

As we are migrating our app from Firebase to Couchbase, we also need to change the authentication part. We are using the google_sign_in package and would like to continue using it to have the native Google Sign In popup. Using the package we can get a serverAuthCode, which from my understanding we can then send to the _oidc_callback endpoint of Couchbase Sync Gateway. First I had to set disable_callback_state to true in the Sync Gateway configuration ("DisableCallbackState determines whether or not to maintain state between the /_oidc and /_oidc_callback endpoints."). However, when I now send the serverAuthCode to the _oidc_callback endpoint, I get the following error with status code 500:
body: {"error": "Internal Server Error", "reason": "Failed to exchange token: oauth2: cannot fetch token: 400 Bad Request\nResponse: {\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}"}
I assume it is because the login was done using the package and not through the browser with a redirect to the app afterwards. Now I have no idea how to do this correctly though, that I sign in with the google_sign_in package and then use the code to get the tokens from the Sync Gateway. I can't find any helpful information for this problem.
I would be very happy if someone could help me, possibly in a call. Maybe this way something like this can be solved faster.

Telegram API not allowing connection with my bot

I'm trying to load the getUpdates method from Telegram, but it's not working. I've followed step by step the official documentation.
Some users had already posted questions similar to this one, but in their particular case, their problem was that they had forgotten to add bot before the token in the url. That's not my case, as you can see as follows:
This is my GET request in Postman:
https://api.telegram.org/bot<the token goes here>/getUpdates
And this is the response I receive:
{
"ok": false,
"error_code": 404,
"description": "Not Found"
}

idpiframe_initialization_failed with People Api

I am testing out the People Api, i started with the Browser quick start from google
I have followed all the instructions shown on the quick start.
I also added my localhost url to Authorized origins section on google developer console. I made sure i have the correct api key and client ID.
When i access the app's url http://0.0.0.0:8081/ , the page sends back below error
People API Quickstart
{
"error": "idpiframe_initialization_failed",
"details": "Not a valid origin for the client: http://0.0.0.0:8000 has not been whitelisted for client ID 555307262665-8a97q8pl4etkjh98nvsqnn9hu9ah68bv.apps.googleusercontent.com. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."
}
I've read online about the issue and most people seemed to have sorted the issue by clearing browser cache.
I've cleared browser cache and enabled see cookies and site data for
accounts.google.com on the browser, but that doesn't seem to help, i still get the error.
Is there anything am missing ?

Google-Oauth authentication error

Getting the following error when trying to login with google -oauth.
I, [2014-04-23T10:08:24.349056 #4905] INFO -- omniauth: (google_oauth2) Request phase initiated.
I, [2014-04-23T10:08:24.861288 #4905] INFO -- omniauth: (google_oauth2) Request phase initiated.
I, [2014-04-23T10:08:28.637438 #4905] INFO -- omniauth: (google_oauth2) Callback phase initiated.
E, [2014-04-23T10:08:30.207714 #4905] ERROR -- omniauth: (google_oauth2) Authentication failure! invalid_credentials: OAuth2::Error, {"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}], "code"=>403, "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
The answer is in your error log, Activate the Google API in developers settings in your account.
I found this question after some googling, and I was not very satisfied with #Babar's answer, as it id not actually resolve my problem.
After a lot of digging around I found that you have to enable the Google+ API (some also say you need the Contacts API) in your developer console. I did not have to do this before, but apparently some change has come around.
To do so, do the following steps:
Go to https://console.developers.google.com/project
Select your project
Press "APIs & auth" from the side-panel
Press "APIs" from the dropdown
Find and enable Google+ API and Contacts API
After they are enabled, WAIT ABOUT 5 MINUTES for the APIs to kick in.
Now you should be able to use the Oauth2 login again.
I was also having a similar issue with my Rails app throwing error 403. So I resolved it by upgrading the omniauth gems by running bundle update devise omniauth omniauth-google-oauth2 in the terminal.