OAuth Login CONNECTIVITY_ISSUE Uber SDK - uber-api

The email id linked with Uber is: fikarrnot28#gmail.com
After successfully logged into user account though the App using LoginManager, the error occurred.
This is the generated GET Request of login in the web view (I have found it when debugging the Uber SDK LoginActivity)...
https://auth.uber.com/login/?breeze_local_zone=sjc1&next_url=https%3A%2F%2Flogin.uber.com%2Foauth%2Fv2%2Fauthorize%3Fclient_id%3D_AZAHxnjsACGj4oNYtQmHT2BoxLoRslm%26redirect_uri%3Dhttps%253A%252F%252Fwww.fikarrnot.com%252FPrivacy-Policy%26response_type%3Dcode%26scope%3Dprofile%2Bhistory%2Brequest_receipt%2Brequest%2Ball_trips%26show_fb%3Dfalse%26signup_params%3DeyJyZWRpcmVjdF90b19sb2dpbiI6dHJ1ZX0%253D%250A&state=BpOm3pJ5GOScZSjle7l4hsCKCczTjYO2XvoV8e-RviI%3D
...with Headers...
[{"key":"X-Requested-With","value":"com.en****rs.fi****not.fi****not","description":""},{"key":"Cookie","value":"utag_main=v_id:01626ccd77e200225dc1cfc5c6c40009801c709000400$_sn:1$_ss:1$_st:1522245627690$ses_id:1522243827690%3Bexp-session$_pn:1%3Bexp-session$segment:a$optimizely_segment:b; _ga=GA1.2.14743532.1522243830; _gid=GA1.2.1008247445.1522243830; AMCVS_0FEC8C3E55DB4B027F000101%40AdobeOrg=1; aam_uuid=62184944397867583642625051211265352658; AMCV_0FEC8C3E55DB4B027F000101%40AdobeOrg=1611084164%7CMCMID%7C62681591052865814432656684984272277453%7CMCAAMLH-1522848630%7C3%7CMCAAMB-1522848630%7C6G1ynYcLPuiQxYZrsz_pkqfLG9yMXBpb2zX5dvJdYQJzPXImdj0y%7CMCOPTOUT-1522251030s%7CNONE%7CMCSYNCSOP%7C411-17626; AAMC_uber_0=AMSYNCSOP%7C411-17626; udid=w_2b967ea663b645cdbd69338871543566; arch-frontend:sess=BAqSPo47olILtPKNMYph-A.Js4qapThHROtKkyZNYsCJC8VwKDpejcPNcDzi8l_zuHUssy_5Xz_FO2swyc1v519menihaos4oCb4GpyKLIjclRD9LlQK79RvjhCnn-YCRHGEgIP3ZVwSLK10taTmHhsKhWPya-l7qA24XD3OlBcrXe6WfMdVQh7q00KJQMG0P4pvevBB-zSixSuMx4DmN9SsQ4JZSx-3jn2XvW8qO_S7-II8nebHXbCMz83acRilZUTw81aUU5dJhLR-Y38z9ZvkNyoGjpuInCguKYS_IOJMB5V1Vj7VC47F3N80lk4Fdl_i-IXpYw7uGCIvK_EhBX2QprbZlkPTvclJ1sBGVy9WG57MQ2P0mMh9JO6xMqqCX6TXoFVJMo3hGtjINXZmAxkh-Hs4l1QMheaJBxClGEmhwAbfOwwaFeGbKXfIRos9yqgC6cdB7CJDhNQmqabAVlzInp0zGnlxt9tPsInZF-jGhWJnbG9I3Z7qzrHpUoYHD7bsmaPfeyMpaywYbRu8KgTCN_iukWz5UOc7iGrzA1k-_QKNUF7IoCK9nMOK0EHcLwFoOHusoXWW8AlHUto28Hg0gEZYQWLW7s0TRq-XFwdt5MW5PuFtRDmU6QVt2E4QLfzghwvJvVGPrOvtyJbcEorVm9I0taYvYJgaLn9VFW7No4H_V9xz0CVRXT63fshZnUV_Ggx3s0N9eZToKnb_AC-l7HyxGb3mKXypLuNl7ZDQdz-ONRc8s7-7BiaCAGPjbUE1d_R5a6F4STBJyXoq4LENS9o8PdrumbhdCZvzk1aT3jdyTldlCi0chUmz8jP1FdQ6Yfdte2UYzHnGs8pKHcE4OZlepf-Jnb6PY2svG6TWJby9hbMq1XYwFgmUvcnJELk_WDLQW3lXsa9YnOnX5lZBqyIqxYhQQXEJTtxdmcJfE1pwzSOiXvlh6UIBs_2MVLRr3Dc8jhc5qp8YjgV2pYa.1522243813342.1209600000.MQ38q8xYZeHYu454GB5ZPUpQ-yvZ0ZsHya8VOcIFqOQ","description":""},{"key":"Host","value":"auth.uber.com","description":""},{"key":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","description":""},{"key":"User-Agent","value":"Mozilla/5.0 (Linux; Android 7.0; SM-J701F Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/65.0.3325.109 Mobile Safari/537.36","description":""},{"key":"Upgrade-Insecure-Requests","value":"1","description":""},{"key":"Connection","value":"keep-alive","description":""},{"key":"Accept-Encoding","value":"gzip, deflate","description":""},{"key":"Accept-Language","value":"en-GB,en-US;q=0.9","description":""}]
The Response coming "Too many requests", after that onLoginError() called with CONNECTIVITY_ISSUE error.
Another thing is that, maximum time Uber SMS gateway is not working when I try to login (2 factor verification), thus OTP is not coming. I have also tried adding another developer in the developer dashboard, but They are also unable to get OTP when try to login.
Note 1 : The redirect url I am using in my app is exactly same as I am using in my developer dashboard.
Note 2 : Previously my code was working perfectly in the sandbox environment (with sample uber account), but now it is not working after I have changed to the new account. So, I suppose the code is not the problem.
Note 3 : The previous email id linked with this app for Uber was msayan64#gmail.com
Note 4 : The App is going to publish very soon, and it is using Uber as a value addition.
Questions:
Are there any changes required to my code?
Can using the sandbox mode be a problem?
If I need to give the App URI as the redirect URI, what should be the format (suppose the package name (App id) is com.example.app)?
When will be the SMS gateway work?

Related

HTTP Get Requests (Wordpress website Rest API calls) not working in iOS App (Ionic4 and angular)

My Ionic4 App (with angular) is published in both PlayStore (Android) and App Store (iOS). The app is expected to show the latest articles from a Wordpress based website. The app makes a HTTP GET request to fetch JSON data (calling the WordPress rest API at URL https://website.com/wp-json/wp/v2/posts). Sample code from page ts file:
import { HttpClient} from '#angular/common/http';
this.http.get(url).pipe(map(res => {return res}));
My app is working fine in Android but failing to display content in iOS devices.
Apple Support team is unable to help as they only look into swift code. For Ionic code, they are suggesting to get help from Ionic community experts. This issue has blocked our release and became a show stopper for us. I request you to help us resolve this issue at the earliest.
Regards,
Nanda Kishore
I have also faced the same issue in which iOS device fails to make HTTP calls but android works fine.
First I've detected the platform using Platform helper class whether the platform is iOS or not and then tried the same call with adding user-agent while making http call.
callWithUserAgent(url: string) {
const config = {
headers: {
"user-agent": "Mozilla/4.0 (compatible; MSIE 6.0; " + "Windows NT 5.2; .NET CLR 1.0.3705;)"
}
}
return this.httpClient.get(this.baseUrl + url, config);
}
This worked for me.
Adding user-agent sounds crazy but you can try atleast. Make sure you add user-agent in small caps.

Github login from Unity3d usable from smartphone & standalone

Have been posting around without success :
https://forum.unity.com/threads/github-login-token.521941/
https://platform.github.community/t/login-from-ios-download-a-single-file-using-unity3d-engine/5325
I am making a container app for iOS using Unity3d.
The user should login to GitHUB.
Should access to a list of file (mostly image file type).
download possible.
Well so far…
I have made a github app, then I have the client_id and the client_secret.
Making research I found this url works to request permission to user for your app :
url = “https://github.com/login/oauth/authorize?scrop=user:email&client_id=” + client_id
Well if you copy past the url with your client ID directly into the browser it will redirect you to your home page url with a form like this:
https://www.yourhomepage.com/?code=2ce706d933c922d7f22c
The code always change on each login or session.
Finally back to Unity, you can use a WWWForm, etc… with the following data to get receive the token :
url = https://github.com/login/oauth/access_token2
client_id = xxxx (from your app detail)
client_secret = xxxx (from your app detail)
code = xxxx (from the previous step.
The big question is how could the login could be done via wwwForm and it it exists.
Then file request from a Private repository.

What is https://i.instagram.com/api/v1

I am digging into Instagram APIs and find out a URL https://i.instagram.com/api/v1 which used by many git repos(some are recently updated) but when I go to Instagram there is no such url available there. Can anyone guide me what is the use of this url and how I can use it because when I hit
https://i.instagram.com/api/v1/accounts/login/
by POSTMAN i got below message
{
"message": "Your version of Instagram is out of date. Please upgrade your app to log in to Instagram.",
"status": "fail",
"error_type": "needs_upgrade"
}
One more thing. I am with my friend who work in android he has done reverse engineering on a app which use for increase followers and that app is also using same endpoints and working on that app.
It's November 2021, and somehow the API https://i.instagram.com/api/v1 still works, but I believe they have changed the way you use it.
NOTE: The given information is just for educational purposes
Let's take the user/{user_id}/info endpoint of this API, which returns basic information about the user_id.
The URL with this endpoint would be
https://i.instagram.com/api/v1/users/176702683/info/
If you paste this link into your browser you'll get the following message
{"message":"useragent mismatch","status":"fail"}
This means that API must be called via mobile user-agent. read more about user-agent here
We can solve this problem by providing a mobile user-agent string.
Using python requests library
!pip install requests
import requests
URL = https://i.instagram.com/api/v1/users/176702683/info/
headers = {'User-Agent':'Instagram 76.0.0.15.395 Android (24/7.0; 640dpi; 1440x2560; samsung; SM-G930F; herolte; samsungexynos8890; en_US; 138226743)'}
# samsung mobile user-agent
response = requests.get(url, headers=headers)
print(response.json())
Output:
{
"user": {
"username": "marcelotwelve",
"pk": 176702683,
"profile_pic_url": "https://instagram.fzrh3-1.fna.fbcdn.net/v/t51.2885-19/233796637_544571223333074_8761964745157634211_n.jpg?stp=dst-jpg_s150x150\\u0026_nc_ht=instagram.fzrh3-1.fna.fbcdn.net\\u0026_nc_cat=1\\u0026_nc_ohc=Cfk2kHCxgbIAX_vgNjn\\u0026edm=AEF8tYYBAAAA\\u0026ccb=7-5\\u0026oh=00_AT-tuXbAbsIkvmJqm_akQS__UPDtEXZxZChx2lO-9Wb0FQ\\u0026oe=62A8115E\\u0026_nc_sid=a9513d"
},
"status": "ok"
}
NOTE: Please be aware of how you use it
It is actually an API, that you can only use from your phone application, thats why it say it needs upgrade. you can download an addon for chrome / firefox to switch user agents, and after that you will be able to see the content.
It's worth checking there is lots of info about any user on insa
this response is a default error caused by having no cookie set
inspect instagram, you can see a redirect first (this way they fill initial cookies set for you). copy paste it to postman and try again

Getting a 403 forbidden error when posting in Facebook using Prime31 pkugin from Unity3d

Before I ask my question here are a few details of my setup and the problem I am facing.
This is my first post on StackOverflow :).
Platform :
Unity3d engine + Prime31 plugin for Facebook
Context :
I am trying to integrate Facebook into our Mobile iOS app, developed using Unity3d (still in development), and I am trying to post to the user's friend's wall using a plugin called Prime31.
Problem :
I keep getting a 403 forbidden error when I post to the friends wall
Code :
I am using the following piece of code
var token = FacebookBinding.getAccessToken();
Debug.Log( "access token: " + token );
var param = new Dictionary<string,object>
{
{"message", "Test message for dragons "},
{"access_token" , token},
{"name", "School of Dragons"},
{"caption", "Join the world of Dragons"},
};
Facebook.instance.post(id+"/feed",param, OnPostComplete);
Where id is retrieved from another piece of code.
Additional Info :
With the same setup, publishing on my own wall works. (me/feed instead of id/feed)
The friend I am trying to post to and myself both are listed as developers in the account for the app.
I have the the info.plist additions according to the steps provided by Prime31.
I have done extensive googling on this problem and most of the replies indicate a high number of posts being made from the server / app as a possible reason.
Questions :
Is filling in the Native IOS App setting in the developer console a must for publishing ?
Is the number of posts made by a developer application in Facebook restricted ? Because I can post to the same friends wall with the same content outside of the app. This seems to be the least likely scenario.
Why could this problem be happening ?
Any help would be greatly appreciated as we have a deadline approaching in three days and this feature should be done and ready in a couple of days.
Thanks
Anur
When I use me/photo to share a picture I have meet 403 error.My case is because of my Facebook app not approve the publish_actions permission,and I use a normal user for test,just test user can use not approved permissions.You can use app manage page's menu "Status & Review" -> "Submission" to request permission.
Well, I'm using unity3D I had the same FBResult::Error (res.Error.Text) text (403 forbidden)
You need to see what the res.ToString() says.
For example mine is
""message":"(#200) Requires extended permission: publish_actions","type":"OAuthException","code":200,"fbtrace_id":"C3X4jSCm7or"

Can't login via Facebook iOS SDK 3 with a test user

Have a code that is working with ordinary FB user (login and post). Just created test user but unable to login. Getting message "we didn't recognize your email address or phone number". After calling https://graph.facebook.com/362652477144946/accounts/test-users?... I got:
{
"id": "100004233554579",
"access_token": "...",
"login_url": "https://www.facebook.com/platform/test_account_login.php?user_id=100004233554579&n=Ffaa4FVusNloYGS",
"email": "iosproject_gaxfjez_iosproject\u0040tfbnw.net",
"password": "..."
}
Tried entering "100004233554579", "Ffaa4FVusNloYGS" and "iosproject_gaxfjez_iosproject\u0040tfbnw.net" at username but nothing works. Any ideas?
UPDATE1 Noticed "\u0040" in email, so changed that to "#". But then getting "We didn't recognize your email" :)
UPDATE2 Noticed there's another email "100004233554579#facebook.com" when logged to Facebook login_url but it doesn't work too.
I faced the same problem with test facebook user login from mobile device - "we didn't recognize your email address or phone number".
What I did:
Went to dev console and created new test user
Clicked edit and changed password in console - than was a mistake
After you change password via dev console - facebook also changes test email. And you are able to login only at facebook.com website (not android, iOs or m.facebook.com) - because you get a security warning that email was changed. Also you can't use simple emails like qwerty.
What you need to do to get it work:
Create new test user in console (do not change anything)
Go to Graph API, generate application token, get test users via {app_id}/accounts/test-users (details)
POST new password (only password) to the test user /{user_id} (details)
Now you shall be able to login using m.facebook.com, Android or iOS apps
A little bit wierd
From your response, it seems like the email required for login should be
iosproject_gaxfjez_iosproject#tfbnw.net.
That should work for you with the password generated.
You can read more about creating test users here.
If it still doesn't solve your issue, please create a bug report at
http://developers.facebook.com/bugs and we'll be more than happy to look into it.