I copied the whole of the example.php in the Facebook php sdk at the exmaples folder to another php file and i got this error:
Fatal error: Uncaught OAuthException: Invalid OAuth access token signature. thrown in C:\wamp\www\facebook-php-sdk-4ea94b9\src\base_facebook.php on line 1039 .
When i comment this line: $naitik = $facebook->api('/naitik'); . Everything seems to be quite fine except this error: Notice: Undefined variable: naitik in C:\wamp\www\facebook-php-sdk-4ea94b9\examples\newExample.php on line 100 . Which is expected. What could be the problem?
You probably are not following the authentication process correctly. Ensure your app id and secret key are correct. Make sure you're running your app from the domain you specified in your app settings on facebook.
Related
I get 500 server error on my django website thats running on Google App Engine. When I look at Google App Engine logs I see the following error:
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest returned "The caller does not have permission">
When I hard refresh the browser this error goes away. Then after some time it pops back up. Happens on mobile(firefox, safari), laptop (firefox,chrome).
UPDATE:
In Django settings.py I have following code. Its last line generates the error :
pickle_path = 'token.pickle' # path to token.pickle
with open(pickle_path, 'rb') as token:
creds = pickle.load(token)
SERVICE = build('gmail', 'v1', credentials=creds) # ERROR LINE
When I run the django server locally: I get following error:
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest returned "The caller does not have permission">
When I restart cloud sql connection from my terminal - the error is gone. This never used to happen until a few days ago.
Here's a workaround:
Download the discovery_doc directly from google here
Load the json file (you can name it gmail-api.json)
Build from this json file using build_from_document
Before
from googleapiclient.discovery import build
gmail_creds = get_service_account_creds()
gmail_service = build('gmail', 'v1', credentials=gmail_creds)
After
from googleapiclient.discovery import build_from_document
discovery_doc = load_json('config/gmail-api.json')
gmail_creds = get_service_account_creds()
gmail_service = build_from_document(discovery_doc, credentials=gmail_creds)
It seems that it is now a P0 for Google, so hopefully it will be fixed soon.
https://issuetracker.google.com/issues/160441983
I am also started facing this issue. I have been using Google APIs for more than a year, but suddenly this error HttpError 403 when requesting https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest returned "The caller does not have permission. However, couple of times I didn't see this error and API call was successful. I hope this error at the Gmail API server.
Update:
I am able to call Google APIs without any issues. Seems like issue is resolved at google's end.
I am having the same issue with GAM ADV-X. I thought it was an issue on my computer so I tried on 2 different computers and get the same error. It indeed looks like something changed in the Gmail API over the weekend. Will submit a ticket to Google.
I've followed closely this tutorial which is great.
Everything worked fine until today, where when I log with github I get this error:
HTTPError at /oauth/complete/github/
403 Client Error: Forbidden for url: https://github.com/login/oauth/access_token
What am I missing / what could I have changed?
I'm currently developping a Website with social networks login.
Everything works fine (google, facebook and twitter) but not github: after some attempts, I'm getting now a 403.
The problem in Django is that 403 errors dont show the HTML content that come with the error!
I had to run in Debug mode and add a breakpoint in the file
/usr/local/lib/python3.7/site-packages/requests/models.py
line 940 / where there's the code raise HTTPError(http_error_msg, response=self)
Inspecting the variable self.content.decode("utf-8") showed me that I've been restricted (for no logical reason - what's more strange is that the same code, on my same PC but under Windows, works like a charm).
I'm hoping the technical team at github will explain what went wrong...
I am using google speech to text api and followed all the steps mentioned in below link :
https://cloud.google.com/speech/docs/getting-started
When I used the commands using command line interface mentioned in above page, everything seems fine and I am getting the output text as well.
But, if I create a php file for the same commands then it is working fine for 1 hour and then the token expires. And also not creating the token with below command via php file :
shell_exec(gcloud auth activate-service-account --key-file=/keyfile.json)
shell_exec(gcloud auth print-access-token)
But the same command is working very fine on command line system.
So basically I am having issue with the authentication process via php file and getting the below error :
"error": { "code": 401, "message": "Request had invalid authentication credentials.", "status": "UNAUTHENTICATED" } }
Can anyone please tell what I am missing or am I following the wrong approach for authentication?
Reproduced successfully and ran again the php file after one hour and then 2 hours with the same result: no errors. You may consider providing more detail, maybe by including directives such as ini_set('display_errors', 'On'); error_reporting(E_ALL); in your file.
A relevant read about the on-hour expiry of credentials is to be found at [1], in the 401-error sub-chapter.
[1] https://cloud.google.com/storage/docs/xml-api/reference-status
Im trying to regenerate my client secret at the url account.live.com/developers/applications/appsettings/* for my app (for push notification). When I click regenerate, it is stuck with 'Saving...' WHen I was inspecting the apge, I see the following error.
devPortalPackage_9SFHnFq2hYQlQAo6KyjLzw2.js:40 Uncaught TypeError: Cannot read property 'BICI' of undefined
devPortalPackage_9SFHnFq2hYQlQAo6KyjLzw2.js:1 Uncaught TypeError: $BSI.reportEvent is not a function
Thoughts how to over come this? I tried on a chrome/Mac, Chrome/Windows and IE/Windows, the issue remains the same.
Appreciate the help. Thanks.
Can you try navigating to https://apps.dev.microsoft.com/#/appList and click on your app, and see if that works?
I think the account.live.com/developers/* site is old which is why you are running into issues. My account redirects me to https://apps.dev.microsoft.com.
I'm using a webservice to get information from the server and got this error:
Error: Request for resource at http://backoffice.dev144.com/PPIWS/B144_MAPWS.ASMX by requestor from http://maps.localhost:10000/B144/Images_v2/b144_map.swf/[[DYNAMIC]]/4 is denied due to lack of policy file permissions.
*** Security Sandbox Violation ***
Connection to http://backoffice.dev144.com/PPIWS/B144_MAPWS.ASMX halted - not permitted from http://maps.localhost:10000/B144/Images_v2/b144_map.swf
Of course i put crossdomain file in the main server directory that looks like this:
allow-access-from domain="*" secure="false"/
Can anyone tell me why it's not working?
As I see you try to login to a different subdomain http://backoffice.dev144.com/
If you have the crossdomain.xml on the main //www website this will not work.
You need to copy the crossdomain.xml also to the backoffice.dev144.com/crossdomain.xml