The Google Maps Platform server rejected your request. This API key is not authorized to use this service or API. This happens in my flutter project - flutter

THIS IS WHAT I AM GETTING IN NetworkImageLoadException
════════ Exception caught by image resource service ════════════════════════
The following NetworkImageLoadException was thrown resolving an image codec:
HTTP request failed, statusCode: 403
The Google Maps Platform server rejected your request. Unable to authenticate the request. Provided 'signature' is not valid for the provided API key, or the provided 'key' is not valid.
AND THEN THE SECOND EXCEPTION WAS THROWN ----
The Google Maps Platform server rejected your request. This API key is not authorized to use this service or API.
I have created Google Map API from google Map Console and enabled the - Maps SDK for Android, Maps SDK for iOS & Maps static API, and still not working after that. Got any Ideas!!!
And yes also tell that I am not using the billing account for this. If you know any other way than this, You are absolutely free to tell me.

Related

Error 403 "forbidden" being thrown on unity web application

Recently (within past week) our unity webgl (Unity v2019.4.16f1) application has been unable to read files using the google drive API. When I check the web console I see the following error:
UnityGoogleDrive: HTTP/1.1 403 Forbidden
Google Drive API Error Description: Code '403' Message: 'The request is missing a valid API key.'
Domain: 'global' Reason: 'forbidden' Message: 'The request is missing a valid API key.' LocationType: '' Location: ''
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
The application has been in place for 4 months without issue until now.
We currently have an OAuth 2.0 client ID setup, but no API key as we haven't needed it before. The plugin we are using for google drive access in Unity (https://github.com/Elringus/UnityGoogleDrive) does not have any obvious settings for adding an API key in addition to the OAuth ID.
When running the application directly in Unity (which uses localhost) there are no errors and files can be accessed.
I have tried disabling and re-enabling the API in the cloud console. This has given mixed results. The initial request on the web application after re-enabling the Google Drive API succeeds without any errors. All subsequent requests fail with the same error.
Based on the missing values I thought the issue might be that we needed a valid billing plan assigned to the google project but that has not resolved the issue either.
I have tried generating an API key but I am not sure where I need to pass it in order to resolve the issue (if that is even the cause of the issue).
The error reported was a red herring. The real issue was that our request was not triggering authentication with Google. Our Unity dev environment had cached an authentication token which is why the dev environment functioned but the production app failed.
We resolved the issue by sending a request to the GoogleDriveAbout API before anything else, which seems to reliably trigger reauthentication. Once authenticated everything works as expected.

I needed to access HUAWEI AppGallery Connect API and create a product through the PMS API (server API). But 403 client token authorization fail

Recently,I needed to access HUAWEI AppGallery Connect API
and create a product through the PMS API (server API). However, when Postman
was used for basic service interconnection tests,
the error message "403 client token authorization fail" was displayed.
how can i fix it?
Based on the error code included in your screen captures, the error was caused by an authentication failure.
To solve the problem, you first need to confirm that the client ID used for applying for the token has sufficient permission.
HMS official document suggested that the project associated with the API client be selected as N/A. You need to create an API client and associate it with a project. E.g. An app ID in the project was 100xxx591. However, the app ID in the Postman service request was 101xxx531, which would cause the authentication failure.
Also, to fix the above, you need to create an API client and selected N/A (indicating that all projects are supported), and use the client to request a token. The process should work well after this.
In general, if Huawei's 403 authentication failure occurs, you can verify the permission first, and then check the associated projects.
For more details about the PMS API, please refer to this link.

AWS Amplify native app client secret required to proceed but causes exception for having it?

I am attempting to import authorization from an existing backend for multiple frontends (in this case both an Android and iOS app; this error is starting from the Android side of things though) however when following the guides out there, I get stopped on this step due to the error:
% amplify import auth
Using service: Cognito, provided by: awscloudformation
✔ What type of auth resource do you want to import? · Cognito User Pool only
? Select the User Pool you want to import: …
❯ The selected Cognito User Pool does not have at least 1 Native app client configured. Native app clients are app clients with a client secret.
dev-user-pool (us-east-1_.........)
So I create an App client with an App client secret to continue, only after I get this exception after calling Amplify.Auth.signIn:
Sign in failed
com.amazonaws.services.cognitoidentityprovider.model.NotAuthorizedException: Unable to verify secret hash for client .......................... (Service: AmazonCognitoIdentityProvider; Status Code: 400; Error Code: NotAuthorizedException; Request ID: ........-....-....-....-............)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:742)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:420)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:229)
at com.amazonaws.services.cognitoidentityprovider.AmazonCognitoIdentityProviderClient.invoke(AmazonCognitoIdentityProviderClient.java:6329)
at com.amazonaws.services.cognitoidentityprovider.AmazonCognitoIdentityProviderClient.initiateAuth(AmazonCognitoIdentityProviderClient.java:4290)
at com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUser$24.run(CognitoUser.java:2949)
at com.amazonaws.mobileconnectors.cognitoidentityprovider.continuations.AuthenticationContinuation.continueTask(AuthenticationContinuation.java:147)
at com.amazonaws.mobile.client.AWSMobileClient$6$1.getAuthenticationDetails(AWSMobileClient.java:1224)
at com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUser.getSession(CognitoUser.java:1032)
at com.amazonaws.mobile.client.AWSMobileClient$6.run(AWSMobileClient.java:1174)
at com.amazonaws.mobile.client.internal.InternalCallback$1.run(InternalCallback.java:101)
at java.lang.Thread.run(Thread.java:764)
All the resources I've found around this exception seem to explain to do the opposite but I can't continue as stated if I do not create an App client secret?

UWP Device Portal app deployment Forbidden: CSRF Token Invalid

I am trying to deploy an application to a hololens with the Windows device Portal Rest API.
For some reasons I don't want to use the Microsoft Device portal wrapper.
In C#, with RestSharp, I can get the list of installed packages but when I try to deploy a new app, I get the error Forbidden because of CSRF token invalid.
Then I tried to add cookies from the previous request but I still get this error.
I tried to do the same with Postman but I have a different error: 413 Payload too large. The msix file is 154 MB but I have no problem to deploy it with the web device portal.
Thank you for your help.
[EDIT] I tried a smaller app on Postman and I get 403 CSRF token invalid
After analyzing the web device portal with wireshark I found that it is using a parameter with the name "X-CSRF-Token" while adding a cookie add the parameter "CSRF-Token".
Manually adding this parameter with the right value did the trick.

Getting the list of all locations

I am able to use the computing api. storage api, resource manager api
but when I am trying to get the list of all locations available, I am getting strange authentication exception
to get the list of locations I am sending Get request
https://management.core.windows.net/xxx/locations
ForbiddenErrorThe server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.
is there a need for special authentication?
I found that Azure published REST api for the Resource Manager authentication method
https://msdn.microsoft.com/en-us/library/azure/dn790540.aspx