Twitter_OAuth Error : Domain=HTTP Code=410 - ios

I am getting an error `Domain=HTTP Code=410 "The operation couldn't be completed. (HTTP error 410.)". in iOS application development.
This code previously worked fine but now it is throwing an error.

You might be using v1.0 of the Twitter API.
Then, the solution is to switch to version 1.1.
See: https://dev.twitter.com/blog/api-v1-is-retired
Overview of 1.1 API:
https://dev.twitter.com/docs/api/1.1/overview

Seems that you are using V1.0 of the twitter API. Check Resource URL it might be https://api.twitter.com/1/ instead of https://api.twitter.com/1.1/
For further detail check https://dev.twitter.com/docs/api/1.1/overview

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.

Unable to get channels using graph api

while fetching channels from the team using graph API is not working. It is not working from today. I am getting the following exception.
https://i.stack.imgur.com/tA1Qv.png
I tried the same with code that worked just fine 3h ago to get channels from a specific team. Now I'm getting the same exception. Same Exception when using Graph-Tester.
Coworker tried it aswell with Graph-Tester, apparently it works just fine for her. Seems like its user related. Propably a bug on Microsofts side.
It seems that it could be a bug. I'm confirming that right now GET /teams/[-groupid-]/channels fails for Delegated permission type requests, both for v1.0 & beta with a 400 Bad Request "Failed to execute Skype backend request GetThreadS2SRequest."
However, it's working for me (200) when I use Application permission type in Postman.
It was fixed by the Microsoft Graph team. Now it's working fine. It's not the only problem with channels. It's a problem with team endpoint API. The graph team is fixed the API related issue.

OAuth2 login to SoundCloud recently returns Error Domain=NXOAuth2HTTPErrorDomain Code=401 "HTTP Error: 401"

I am trying to log into my SoundCloud account on an iOS app I develop using the Objective-C SoundCloudAPI framework https://github.com/sangtn/SoundCloudAPI
This worked like a charm the last time I used it but by today I am getting the following error message:
Error Domain=NXOAuth2HTTPErrorDomain Code=401 "HTTP Error: 401"
UserInfo={NSLocalizedDescription=HTTP Error: 401}
Using the same credentials (email and psw) grants me access on the web platform and on the SoundCloud iOS app.
I cannot find any recent changes on the SoundCloud platform nor does their status page indicate any malfunction, so I am asking if anyone is experiencing this as well and if someone has found a cause of this issue?!
Thanks!
Looks soundcloud fixed the issue
Having issues as of last night with my app logging in as well. I've Tweeted and emailed - seems like this could be a broader issue on their side.

Twitter message posting issue ( Request failed with error: Error Domain=HTTP Code=410 "The operation couldn’t be completed. in ios app

One year back I have done one ios app and integrated the twitter+OAuth in the app . When I was releasing my app it is working fine . But now it is giving the error Request E51F2651-7D60-4670-9513-2D6494661959 failed with error: Error Domain=HTTP Code=410 "The operation couldn’t be completed. (HTTP error 410.)" . Can anyone please tell me how to solve this issue .
My app permissions in Twitter is Read, write, and direct messages and Request URI is api.twitter.com/1 . I have searched a lot about this issue . Most of the people are saying that we have to choose the application type to Client only but I didn't find this option in my twitter account . Please give me some guidelines .
It's not clear if you are using the iOS Twitter functionality, or another framework (but the oAuth makes me think it's another framework). The Twitter V1 API has been deprecated and retired. You should now use the 1.1 version:
https://dev.twitter.com/blog/api-v1-is-retired
This means the URI should have 1.1 in it, as opposed to just "1".
https://dev.twitter.com/docs/api/1.1
I would try updating the framework you are using, or perhaps switching to the built in Twitter functionality, which streamlines the authentication process if the user has a Twitter account on their phone.

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