Youtube API - iOS Key - ios

We are using the google API library (objective-c) to try and access YouTube data. I have created an iOS key from Google Console, limited it to a specific bundle id and enabled it. Requests are failing with the error below. I know that it is a known issue while using bundle identifier to generate the key, but want to confirm if this issue still persists or it is resolved now and expected to work?
I tried experimenting from my side and came to the conclusion that it is still an issue. But just want to confirm if anyone tried recently and succeeded or have any workaround for this issue.Just want to ensure an extra security measure if it is resolved by now.
Error Domain=com.google.GTLJSONRPCErrorDomain Code=403 "The operation
couldn’t be completed. (Access Not Configured. Please use Google
Developers Console to activate the API for your project.)"
UserInfo=0xa3aa0e0 {error=Access Not Configured. Please use Google
Developers Console to activate the API for your project.,
GTLStructuredError=GTLErrorObject 0x8a74630: {message:"Access Not
Configured. Please use Google Developers Console to activate the API
for your project." code:403 data:1},
NSLocalizedFailureReason=(Access Not Configured. Please use Google
Developers Console to activate the API for your project.)}
Issues previously discussed:
Access not configured YouTube API
Access Not Configured Error, Even Though Access is Configured

Related

InvalidAuthenticationToken on calling Microsoft Graph Service

I am follow the tutorial that Microsoft has provided for signing a user into a desktop application using Microsoft Identity Platform and calling ASP.NET Core Web API which calls Microsoft Graph. I believe I followed all of the steps, configuring my service and client per instructions. https://github.com/Azure-Samples/active-directory-dotnet-native-aspnetcore-v2/tree/master/2.%20Web%20API%20now%20calls%20Microsoft%20Graph
However upon trying to add a new "to-do", I get the following error: "Bad Request: An error occurred while calling the downstream API Code:InvalidAuthenticationToken
Message: Invalid x5t claim "
The error occurs on this call:
User user = _graphServiceClient.Me.Request().GetAsync().GetAwaiter().GetResult();
Any idea what the issue might be and how I troubleshoot?
Update: I am in the middle of troubleshooting this now with an admin. I am not getting roles back but he is and we now both agree the issue is on the azure application configuration, not the code... frustrating, but we are at least making progress.
Would you please try pasting the token into jwt.ms to decode it and inspect the claims?
I got a similar error due to a lack of access. Changing Delegated and Application Permission for Users solved the issue. You can try that.

Xamarin google play services login setup

I am trying to hook a Xamarin project up to Google Play Services but keep receiving a SIGN_IN_REQUIRED error when calling Connect. I have read a few posts online but cannot determine what actually causes this error message.
I have setup the a game project and also setup an API with oAuth credentials. I have made sure that the same SHA key is being used in the API credentials and in the application while debugging but I am still not making any progress.
I am currently presuming that this is not a coding problem but rather something to do with the setup of the API services etc but have ran out of things to try at this point.
Firstly, to make sure your network connection is normal, you can run this demo in your network environment.developer.xamarin.com/samples/monodroid/google-services/… Donnot forget to change to clientID in string.xaml.Then , open the firebase console, find this app check the clientID if it is same with your code, and check the SHA-1 hash of your signing certificate.

Request Denied in Google Maps geocode API iOS

I am trying to integrate google maps in my iOS App. I created and tried the iOS key, Server key and browser key as well. I regenerated the keys, but still gets the status as "ACCESS DENIED". I have seen many answers here, but none of the solutions work for me. I get the following response
This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console
and sometimes this
"error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address xxx.xxx.xxx.xxx, with empty referer"
And I tried to use the regenerated key, and i get the following result.
"error_message" : "The provided API key is expired."
The solution may be simple, but I'm really stuck. Any help is appreciated
the log or error is clear.
for use google_maps you must :
• register your app bundle in Google Developer
• get api key ( if you had get it before update it)
• call the google initialize in AppDelegate
[GMSServices provideAPIKey:GOOGLE_MAP_SERVICE];

Unexpected 403 error from Google

I'm currently maintaining an iOS application developed by someone else. The application worked fine until today when suddenly it started returning 403 codes every time I tried to connect to Google Drive. This is the full error:
An error occurred: Error Domain=com.google.GTLJSONRPCErrorDomain
Code=403 "The operation couldn’t be completed. (Access Not Configured.
Please use Google Developers Console to activate the API for your
project.)" UserInfo=0x17db6180 {error=Access Not Configured. Please
use Google Developers Console to activate the API for your project.,
GTLStructuredError=GTLErrorObject 0x17db5ef0: {message:"Access Not
Configured. Please use Google Developers Console to activate the API
for your project." code:403 data:[1]},
NSLocalizedFailureReason=(Access Not Configured. Please use Google
Developers Console to activate the API for your project.)}
I've enabled Google Drive in the Google Console and included the codes google gave me but I still can't overcome this error.
I'm using Google APIs Client Library for Objective-C to connect to GDrive.
Hi I too got similar error in my mac machine 1 month before, I added DNS server 8.8.8.8 and worked fine. May be similar option will be available in iOS device too that can help you.
I believe this issue is because of "API Key". Please make sure you have used API Key in the project and if you have already used that than check the validity of that key.
Take a look at the errors for BigQuery https://developers.google.com/bigquery/troubleshooting-errors Google returns 403 errors for a number of different situations including some quota limitations.
Perhaps with Drive they use the same types of errors
I think it is a recent change I believe.
In google project console check if access to following is enabled:
Contacts
Google+
Also somebody suggested me to set "Referers" to "Any referer allowed". But not sure about it.
Please try.
Here is fix to this Issue :
You just have to add the scope kGTLAuthScopeDriveFile in your Request. Please refer to below code for its implementation.
GTMOAuth2ViewControllerTouch *authController;
NSArray *scopes = [NSArray arrayWithObjects:kGTLAuthScopeDriveFile, nil];
authController = [[GTMOAuth2ViewControllerTouch alloc]
initWithScope:[scopes componentsJoinedByString:#" "]
clientID:kClientID
clientSecret:kClientSecret
keychainItemName:kKeychainItemName
delegate:self
finishedSelector:#selector(viewController:finishedWithAuth:error:)];
IMPORTANT : Now you have to authorize your user again so that The Permission can be granted to the user correctly.
After that Your Code will work Perfectly !
This appeared to be on Google's side. One phone call to them with no changes on our side seems to have fixed it.

iOS Twitter NSURLErrorDomain Code=-1012

I am trying to get the user's contact details by singning up with twitter in my app. I found this project on github which seems really good. I encounter only one problem. If I run it with my new app consumer secret and consumer key codes from twitter it gives me an error :
Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x6898e80 {NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSUnderlyingError=0x68980e0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012.)"}
The output in the console is :
2013-01-16 17:55:24.367 DMTwitterOAuth[3411:c07] current status = Prompt for user data and request token to server
2013-01-16 17:55:24.371 DMTwitterOAuth[3411:c07] current status = Requesting token for current user's auth data...
2013-01-16 17:55:25.433 DMTwitterOAuth[3411:c07] current status = Token received from server
Immediately after I get the alert view in which it says that it encountered a NSURLErrorDomain.
On the other hand, if I run it with some other codes from another twitter app it works, giving me all the details about the user. I just can't understand why for some keys it works, and for some others it doesn't.
Error code -1012 is kCFURLErrorUserCancelledAuthentication. This should mean that some code somewhere called [sender cancelAuthenticationChallenge:] in response to an authentication challenge. This is likely code inside of DMTwitterOAuth, but it's also possible it's Apple's own code inside the URL-loading system.
Make sure that your twitter application access settings are appropriate for what you're trying to do. If you're trying to post a tweet you'll likely need Read and Write access.
See the Application Model docs for more info.
It can be also just wrong authentication data in request header.
Visit the below url it solves the issue generally not in specific to this twitter context.It will give u some idea
https://stackoverflow.com/a/17920301/730807
I hope this helps..
I have recently found this problem occurring in projects where previously Twitter login was working. For this reason I assumed it was due to the change in iOS or maybe an upgrade in the Twitter feature.
One of the main issues is it is almost impossible to recreate this issue, there is a very interesting twitter community blog talking about it here: https://twittercommunity.com/t/ios-twitter-kit-1-10-1-twtrloginbutton-responds-with-1012-error/52766
The Twitter staff are trying to fix this issue but can't recreate it to see what is going wrong.
The problem seems to be that the users Twitter account has become disconnected from their device. This means that the Twitter Auth Helper can't get your details to login correctly.
The way to fix this is to go into settings -> Twitter and then click on your Twitter account name. For me this then prompted me to re-input my password as the account wasn't currently connected. Very frustrating and difficult to find as there is no indication until you click your Twitter account.
I found this solution applied when attempting to login with a Twitter account using Firebase.
According to Twitter, the fix is live in SDK version 1.14.1.

Resources