首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >pyrogram.errors.exceptions.bad_request_400.PhoneCodeInvalid:电报:[400 PHONE_CODE_INVALID] -确认码无效

pyrogram.errors.exceptions.bad_request_400.PhoneCodeInvalid:电报:[400 PHONE_CODE_INVALID] -确认码无效
EN

Stack Overflow用户
提问于 2022-09-30 14:38:52
回答 1查看 134关注 0票数 0

pyrogram.errors.exceptions.bad_request_400.PhoneCodeInvalid:电报说: 400 PHONE_CODE_INVALID -确认码无效(由“auth.SignUp”引起)

当我想注册的时候,它说确认代码是无效的,但是我甚至没有输入确认代码。我已经找了很长时间了,除了stackowerflow之外,我到处都问。有人能帮忙吗?

我得到了确认码,但无法输入。它会给出这个错误,然后发送确认代码。

代码语言:javascript
复制
app = Client(name=number, api_id=api_id, api_hash=api_pass, phone_number=number)

app.connect()

sent_code = app.send_code(phone_number=number)

app.sign_up(phone_number=number, phone_code_hash=sent_code.phone_code_hash, first_name = "dsadadsad", last_name = "asdadsa")
EN

回答 1

Stack Overflow用户

发布于 2022-11-27 13:47:05

以确认代码作为输入,然后在代码中传递。

代码语言:javascript
复制
client = Client(f"sessions/{phone}", api_id, api_hash)

client.connect()

sent_code = client.send_code(phone)

code = input("Enter the code : ")

signed_in = client.sign_in(phone, sent_code.phone_code_hash, code)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73910395

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档