Coder Social home page Coder Social logo

Comments (7)

levlam avatar levlam commented on September 27, 2024

This is intended behavior. Server may not return the user and prevent abuse of the API.

from td.

DenysSamoiliuk avatar DenysSamoiliuk commented on September 27, 2024

This is intended behavior. Server may not return the user and prevent abuse of the API.

tell me, do you know where you can find out about such names, such as a phone number, since the number has been in Telegram for 3 weeks, but we have not used it for 2 weeks, but the search is still not available, and we regularly search for another user everything is fine for sending information, but searching by username does not present any problems, however, I would like to understand these limitations more transparently

from td.

DenysSamoiliuk avatar DenysSamoiliuk commented on September 27, 2024

@levlam i get the following in these methods

https://core.telegram.org/method/contacts.resolvePhone

RPCError: 400: PHONE_NOT_OCCUPIED (caused by contacts.ResolvePhone)
at RPCMessageToError (/home/hrederik/WebstormProjects/novait/telegram-web-api/node_modules/telegram/errors/index.js:28:12)
at MTProtoSender._handleRPCResult (/home/hrederik/WebstormProjects/novait/telegram-web-api/node_modules/telegram/network/MTProtoSender.js:546:58)
at MTProtoSender._processMessage (/home/hrederik/WebstormProjects/novait/telegram-web-api/node_modules/telegram/network/MTProtoSender.js:476:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at MTProtoSender._recvLoop (/home/hrederik/WebstormProjects/novait/telegram-web-api/node_modules/telegram/network/MTProtoSender.js:424:17) {
code: 400,
errorMessage: 'PHONE_NOT_OCCUPIED'
}

https://core.telegram.org/method/contacts.importContacts

res {
CONSTRUCTOR_ID: xxxx,
SUBCLASS_OF_ID: xxxx,
className: 'contacts.ImportedContacts',
classType: 'constructor',
imported: [],
popularInvites: [],
retryContacts: [ Integer { value: 2570974896n } ],
users: []
}

could you share in more detail the data about the restrictions and if you have any information on how to get rid of them from the number

from td.

levlam avatar levlam commented on September 27, 2024

Both search by phone number and by user name are highly limited. It is not possible to harvest Telegram users using these methods.

from td.

DenysSamoiliuk avatar DenysSamoiliuk commented on September 27, 2024

@levlam
for example, I found a user from another number whose phone number is private (only for contacts), and I am not his friend and have no previous conversations, that is, he is completely anonymous for me with privacy settings

photo_2024-09-09_17-45-29

user {
  CONSTRUCTOR_ID: xxxx,
  SUBCLASS_OF_ID: xxxxx,
  className: 'contacts.ResolvedPeer',
  classType: 'constructor',
  peer: {
    CONSTRUCTOR_ID: xxxx,
    SUBCLASS_OF_ID: xxxxx,
    className: 'PeerUser',
    classType: 'constructor',
    userId: Integer { value: xxxxx}
  },
  chats: [],
  users: [
    {
      CONSTRUCTOR_ID: xxxx,
      SUBCLASS_OF_ID: xxxx,
      className: 'User',
      classType: 'constructor',
      flags: xxxx,
      self: false,
      contact: false,
      mutualContact: false,
      deleted: false,
      bot: false,
      botChatHistory: false,
      botNochats: false,
      verified: false,
      restricted: false,
      min: false,
      botInlineGeo: false,
      support: false,
      scam: false,
      applyMinPhoto: true,
      fake: false,
      botAttachMenu: false,
      premium: false,
      attachMenuEnabled: false,
      flags2: 16,
      botCanEdit: false,
      closeFriend: false,
      storiesHidden: false,
      storiesUnavailable: true,
      contactRequirePremium: false,
      id: [Integer],
      accessHash: [Integer],
      firstName: 'Vladyslav',
      lastName: null,
      username: 'pc_Vl_6',
      phone: null,
      photo: null,
      status: [Object],
      botInfoVersion: null,
      restrictionReason: null,
      botInlinePlaceholder: null,
      langCode: null,
      emojiStatus: null,
      usernames: null,
      storiesMaxId: null,
      color: null,
      profileColor: null
    }
  ]
}

from td.

levlam avatar levlam commented on September 27, 2024

Everything works as intended.

from td.

DenysSamoiliuk avatar DenysSamoiliuk commented on September 27, 2024

@levlam thx

from td.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.