TheM4hd1 / SwiftyInsta

Instagram Private API Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Authenticated User's Personal Info (Like Gender, Mail, Phone )

hknckr opened this issue · comments

Hi All,

I could able to get authenticated users personal data like gender, mail address, phone number before May, but now i cant get those data which returns nil.
I think instagram changed something with this end point.

Do you have any idea??

I am trying to get this data like that

let phonenumber = self.handler.user?.phoneNumber ?? "-"

or

self.handler.user?.rawResponse["gender"].int ?? 0

Both returns nil

By the way I am using pod version 2.3.2 (i think the latest right now)

And also pod version 2.2.5 is also the same , return nil for those data fields.

Thanks...

You are correct: Instagram appears to have updated their response to that specific endpoint, getting rid of all sensitive information.
As a suggestion, I would not look for a replacement if I were you. I know I won't. And I'm not gonna merge PR with the updated code, either.
I'm sorry Instagram changes broke your code, but it's a huge relief, from a maintainer's perspective. Privacy concerns were, and are, always a big issue.\

I apologize in advance, but I'm gonna lock this conversation.
I'd rather not have to delete comments with the solution, if I can just avoid it.
Again, I'm sorry, but I truly believe this is the right choice.

to receive personal information such as phone number, email and ...
you can call this endpoint: /api/v1/accounts/current_user/?edit=true
HTTP Method: GET

feel free to push a PR, simply we can change the UserHandler.current endpoint to the new one.