I am using Google Maps API enterprise key for authentication with Google Maps web services.
Upgraded google-maps-services.jar from v0.1.17 to v0.1.18 in the project and got authentication error.
DistanceMatrixApiRequest request = DistanceMatrixApi.getDistanceMatrix(context, orgs, dests);
// using google-maps-services-0.1.17.jar below line works fine.
DistanceMatrix matrix = request.await(); // google-maps-services-0.1.18.jar returns Server Error: 403 Forbidden
Rolling back jar solves the error. What could be a reason for such bazar API error code?
There is a bug in v0.1.18 GeoApiContext throwing 403 Forbidden with enterprise credentials
Using v0.1.19 solved the issue.
Related
I am working on integrating SonarQube within my Organizations' CI pipeline, and getting last this huddle is the last step to doing that. I need help with the problem below:
I am trying to connect my SonarQube Community Edition deployment to GitHub, and I did set up a GitHub app, and used the credentials to set up a GitHub Project on SonarQube. However, whenever I try to initiate the project, I keep getting returned unauthorized: 'You're not authorized to access this page. Please contact the administrator.'. This is at the URL: https:///sessions/unauthorized.
I get this in the logs:
WARN web[AYNny08VYY7aX7LCAAXh][o.s.s.a.AuthenticationError] No provider key found in URI
I've been away from coding for a few years so excuse the simple nature of this question. I've downloaded the Houndify web sdk and followed instructions to get it running on my local web server (localhost). When running it I get the authentication error "signed token rejected". I've updated the config.json and index.html with my client ID and Key. Any ideas?
E W
Can you check:
if you have activated your account by clicking the link in the email
test the request from the API console from the Client dashboard page
I have had the same error and realized that my account was not activated.
I am trying to list all the events in a certain public calendar in a nicely formatted manner on my web page without having a general/public visitor to my web site login or authenticate in any way. I have been doing this since December 2010 using v1 and the Zend Framework. On November 17, 2014 Google deprecated v1 and v2 and now my web page is broken.
Here is what I've done so far:
created a project in the Google Developer's Console
turned on Calendar API
installed PHP Client Library on my server from GitHub (yesterday - release 1.1.1)
ensured JSON PHP Extension is installed on my server
created OAuth 2.0 credentials
created Public API Access key
ensured my calendars are still publicly viewable (they have been since December 2010)
Here is my code snippet:
require_once 'autoload.php'; // 2014-11-24 part of /usr/local/lib/php/google-api-php-client
$client = new Google_Client();
$client->setApplicationName("One_of_my_Calendars");
$client->setDeveloperKey("MY-PUBLIC-API-ACCESS-KEY"); // 2014-11-24 my Public API Access Key
$service = new Google_Service_Calendar($client);
$results = $service->events->listEvents('primary');
Here is the error message I am getting:
Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/calendar/v3/calendars/primary/events?key=MY-PUBLIC-API-ACCESS-KEY: (403) Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.' in /usr/local/lib/php/google-api-php-client/src/Google/Http/REST.php:76 Stack trace: #0 /usr/local/lib/php/google-api-php-client/src/Google/Http/REST.php(41): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request)) #1 /usr/local/lib/php/google-api-php-client/src/Google/Client.php(548): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request)) #2 /usr/local/lib/php/google-api-php-client/src/Google/Service/Resource.php(190): Google_Client->execute(Object(Google_Http_Request)) #3 /usr/local/lib/php/google-api-php-client/src/Google/Servi in /usr/local/lib/php/google-api-php-client/src/Google/Http/REST.php on line 76
Screen Shots:
https://drive.google.com/file/d/0Bytqhoir_Tt5ODRaNzRvS2FZRWs/view?usp=sharing
https://drive.google.com/file/d/0Bytqhoir_Tt5MzlqLWF2Q3M2bUk/view?usp=sharing
Assuming you are accessing public calendars (so no need for Oauth2), there are still two issues:
Issue no.1 you need to have a working API key from a project which has Calendar API enabled in the developer console.
Issue no.2 is your usage of the keyword "primary" without being authenticated. Replace it with the email address of the calendar that you want to access.
I have referred http://www.broadleafcommerce.com/blog/why-your-ecommerce-site-should-integrate-with-spring-social to bring fb and twitter login to my broadleaf site but i am facing following error despite trying many of the solutions posted on stackoverflow and twitter dev support
GET request for "https://api.twitter.com/1/account/verify_credentials.json" resulted in 401 (Unauthorized); invoking error handler
Anybody have any idea how to deal with this error? Is it because in the tutorial 1.0.2.RELEASE version of spring social is used?
After days of effort finally got to know the issue. The problem was version of spring social api. Since the post i was referring to was of sept,2012 as a result i was using 1.0.2-Release which used auth1.0 to connect to twitter but in 2013 twitter started using auth1.1 whose support is in spring social 1.0.3-Release api. Hence i simply changed the version of spring social and the problem got resolved.
Also one thing i found out the twitter does not allow user's email id to be seen so the api calls to get email of a user will always return null.
I am just trying to get list of Albums in a web app using following c# code.
For AccessToken, I wen to OAuthPlaygound and generated an accessToken
with Picasa in scope using valid consumer key and password which relevant to my web application.
Issue :When I execute following code, I get 403 forbidden error along with message as "Invalid Token" error on last line if I use SetAuthenticationToken() option.
However, if I use setUserCredentialss(), it works. Could anyone please
help me in this? Is it that token generated using OAuth Playground
doesn't work here? Or to use client library token should also be geenrated using it? Is there any workaround?
PicasaService service = new PicasaService("codesamples.google.com");
service.SetAuthenticationToken(accessToken); //Doesn't works
//service.setUserCredentials("myUsername", "myPassword"); //Works
AlbumQuery query = new AlbumQuery(PicasaQuery.CreatePicasaUri(username));
PicasaFeed feed = service.Query(query);