Reading over inbox, I get error #298 - php

I developed a app to read over someones inbox for keywords. If found to give them a score. It worked fine for awhile however now it does not. WHen I try to manually put in the information into the graph api (https://graph.facebook.com/(id)//threads?access_token=(token)) I get this error:
{
"error": {
"type": "OAuthException",
"message": "(#298) You must be a developer of the application"
}
}
Any ideas on how to fix this issue?

It sounds like your application got disabled, potentially for violating the terms of service. I would contact the Facebook developer team on their Facebook group. I just tested this API call with my own application and it worked just fine with read_mailbox permissions. Try creating a separate application and trying again.

Related

When i try to sign up using my app its says Client_Error

so I contacted my hosting this what they said
I'm sorry but we do not support Applications related queries. You need to contact your App developer since this is an App related issue.
but my app developer said
For signup issue:
This is not related to the app. It is your hosting that is causing this problem.
data": "document.cookie = "humans_21909=1";
document.location.reload(true)" "originalError": [Error:
Request failed with status code 409], "problem": "CLIENT_ERROR",
"status": 409,
pls i need help

Method not found. error when using Google my business API

I am getting 404 from accouts list function by using google api client.
I have already access token by using OAuth2.0.
In addition to this, I already enable the Google My Business API via https://console.developers.google.com for OAuth 2.0.
â– Here is environemnt
PHP 7.2.3
Ubuntu 18.04 LTS
google/apiclient ^2.5
The function I want to execute is as following.
https://developers.google.com/my-business/reference/rest/v4/accounts/list
I install google client libray by using composer from following link.
https://github.com/googleapis/google-api-php-client
Since google my business library is seprated, I use this program.
https://developers.google.com/my-business/samples
The steps to produce 404 is...
$client = new \Google_Client();
$client->setApplicationName("post_dev"); // app name
$client->setApprovalPrompt('force');
$client->setAccessType('offline');
$client->setAccessToken($credential);
$client->addScope("https://www.googleapis.com/auth/business.manage");
$client->addScope("https://www.googleapis.com/auth/plus.business.manage");
$gmbService = new \Google_Service_MyBusiness($client);
$results = $gmbService->accounts->listAccounts();
The variable $credential has following values.
client_id
client_secret
access_token
expires_in
refresh_token
After executing program, I am getting 404 erros like follwoing.
Google_Service_Exception[
404
]: {
"error": {
"code": 404,
"message": "Method not found.",
"errors": [
{
"message": "Method not found.",
"domain": "global",
"reason": "notFound"
}
],
"status": "NOT_FOUND"
}
}
It happens because you are trying to interact with the Google My Business API using a non-whitelisted project.
I faced the same issue. In my case, I submitted my project for whitelisting to unlock Google My Business API library.
Then, a couple weeks after that I created a new project under the same Google Cloud Platform account, just to set a more appropriate name. HERE was the root of the issue!
Even if you see the GMB library enabled at the account level, it works only at the PROJECT level. That's why you are getting 404 errors.
So, I switched everything to my original project (Consent screen settings, Oauth clients, etc)... The same on my localhost application, developed with Laravel Lumen 7.
After these couple changes, everything worked fine!
NOTE: Google allows you to whitelist 1 project per account ONLY! If your project/application were approved by Google, USE IT! Instead creating new ones.
This error has nothing to do with your access token. It cant find the method you are using. Google_Service_MyBusiness is not part of the Google api php client library.
The my Business API is unlike the other apis, it is not listed in the API directory available through the Discovery API and it requires a developer key and project acceptance into My Business. There for it cant be generated when the library generation script runs.
Im going though some channels to get that documentation page updated.
note from team Nov 1, 2018
There is a tool on the way that will help developers maintain their own version of such service classes. When it is ready and you have a project with My Business enabled you should be able to run:
export API_KEY=yourkey
bin/generate 'https://mybusiness.googleapis.com/$discovery/rest?version=v4&key=$API_KEY' generated-output
and then you can move the contents of generated-output/mybusiness-v4 anywhere you want in your include path.
That discovery URL has been known to change as new versions come out so keep and eye on https://developers.google.com/my-business/reference/rest/
Im waiting to hear the status of this.
The reason why I could not call the API is "my company already has a whitelisted project to access the Google My Business API. At this time, they are only whitelisting one project per business.". Therefore, I could not call API.
So far I'm able to use the PHP Library here - https://developers.google.com/my-business/samples/previousVersions
But the answer above was a huge help - I had EXACTLY the same issue, had "tidied up" my projects - after being granted access to the Google My Business API and seeing it available for my other projects I assumed incorrectly that my other projects would be able to use it - wrong! Very glad I found the answer here. Luckily I was able to restore the project I'd deleted, and using that one it worked straight away.

AWS Alexa skill linking with oauth 2

Hello to all
I am new in Amazon Alexa, I have a work to Alexa Skill account linking using PHP with oauth 2.0.
I have successfully configured all and also get code for Auth Code Grant but when I run my code in Chrome Browser it is generating Account linking Failed issue but when I run same URL in Firefox it generates Amazon linking failed with ERROR=missing-state.
Please help me to resolve my issue, any help would be highly appreciated.
Implementing Account Linking is tricky at times. The thing is at some point what happens between Alexa and the OAuth2 server is transparent for the Skill (Lambda), for example the process of refreshing a token among others, that is why I suggest you take a look at the references cited below.
Also because of the error shown, it seems that the parameter code is missing in one of the URLs exchanged back and forth between either the Alexa web console or Alexa mobile app and the OAuth2 server. Please verify it is always the same and is always present in the URLs. Implementing a proxy for sure will help on debugging this issue.
I would suggest you take a look at these great sources:
Debugging Account Linking
Using API Gateway to Debug Account Linking issues
I hope this helps somehow.
Cheers

Has anyone found the workaround to the liveStreamingNotEnabled bug?

I'm having the same problem as a few other people have had here on SO. I can't find a single answer to the problem.
Even though live streaming is clearly enabled and I am streaming live, I get this error from the api.
{
"error": {
"errors": [{
"domain": "youtube.liveBroadcast",
"reason": "liveStreamingNotEnabled",
"message": "The user is not enabled for live streaming.",
"extendedHelp": "https://www.youtube.com/features"
}],
"code": 403,
"message": "The user is not enabled for live streaming."
}
}
This user says that it turned out to be a permissions problem. However, his "answer" does not answer the question. Note that I am trying to use this to access information on my own stream, so I should be able to do it, or grant permission to my app. This question was asking how to access other people's stream data, while I want my own data, therefore not a duplicate. Thanks.
YouTube Streaming API says user is not enabled for live streaming
The YouTube Live Streaming API lets you create, update, and manage live events on YouTube. Using the API, you can schedule events (broadcasts) and associate them with video streams, which represent the actual broadcast content.
There for it would make sense for Google to insist that the authenticating account would have live streaming enabled.
I suggest you check that it is enabled for use with the API. How to enable Live streaming Remember that the YouTube Api authentication is channel based. When the user authenticated they had to pick a channel. Could they have picked one that did not have live streaming enabled. Remember you will only have access to the one channel. If the user has more the one channel you will need to authenticate to each one.
While I do agree it seams strange if all you are going to do is list things that you would need to have live streaming enabled this appears to be the way the API works.
Personally i would like to see a public request that would let yous each for others live streams but again that doesn't appear to work with this api. I have logged this as an issue / feature request. Live Streaming API: live streaming not enabled

"The user is not enabled for live streaming" Error

I've been struggling quite a bit to solve the this issue. Basically, I'm just trying to connect to my youtube channel and get a list of future and past live broadcasts from my PHP based application. I was able to create a service account on the api console and it seems to be working fine now (as I've had some oauth authentication errors before) but now, I'm receiving this error in my error log:
Uncaught exception 'Google_Service_Exception' with message 'Error calling GET
https://www.googleapis.com/youtube/v3/liveBroadcasts?part=id%2Csnippet&mine=true:
(403) The user is not enabled for live streaming.' in etc...
My youtube account is associated with my personal #gmail.com account. I'm assuming that somehow I have to add the #developer.gserviceaccount.com to my youtube channel but even though I've tried to find any instructions for this, I was not able to find. I have live streaming enabled on my personal gmail account and also have some test events there.
Would appreciate and help in this matter please. Thanks!
Not sure if this will help, but in my case it turned out to be that the account somehow had 2 accounts:
a page with a strange page-id#pages.plusgoogle.com and
a normal Google email account user#gmail.com).
On top of that, I had issues with not renewing the access token: e.g sending an old access token.
Make sure you try the 2 sub accounts; one must have the videos under it. If you choose the wrong one, then you get that error above.

Categories