Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Registering for a new whatsapp password #26

Open
moyamo opened this issue Dec 14, 2015 · 13 comments
Open

Registering for a new whatsapp password #26

moyamo opened this issue Dec 14, 2015 · 13 comments

Comments

@moyamo
Copy link
Collaborator

moyamo commented Dec 14, 2015

I think transwhat should allow a user to register for a new whatsapp password. The current method is not well documented. I'm not entirely sure what the registration flow should be. This is my idea:

  1. User registers with transport, filling in their phone number and leaving the password field blank
  2. Transwhat requests an sms code from whatsapp.
  3. The bot prompts the user for the sms code.
  4. The user enters the sms code.
  5. The bot then requests a password.
  6. The bot then sends the password to the user.
  7. The user must register with the transport again, but this time they fill in the password.

I don't entirely like this workflow. Suggestions would be appreciated.

@NeoBelerophon
Copy link
Contributor

Can't the last step be replaced by let the bot filling in the password into the database?

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

Yes, thanks. I hadn't thought of that. The workflow will be like this

  1. User registers with transport, filling in their phone number and enters "register" in to password field.
  2. The bot prompts the user for their country code.
  3. The SMS code is sent
  4. The bot prompts the user for the sms code
  5. The password is requested.
  6. The password is shown to the user and they are automatically logged in.

@fnaveira
Copy link

fnaveira commented Jan 9, 2016

hi moyamo, i need help with the gateway, i have a error in

File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_authentication.py", line 53, in onEvent
    self.login()
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_authentication.py", line 57, in login
    self.credentials = self._credentials or self.__getCredentials()
  File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_authentication.py", line 37, in __getCredentials
    password = base64.b64decode(pb64)
  File "/usr/lib/python2.7/base64.py", line 76, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

If you are trying to use this method of registering for a password, please use the develop branch. The yowsup-2 branch does not have this feature.

@fnaveira
Copy link

fnaveira commented Jan 9, 2016

moyamo, i have a yousup development branch in /usr/local/lib/python2.7/dist-packages/ , but the error is the same

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

Use the develop branch of transwhat. (Do a git checkout develop).

@fnaveira
Copy link

fnaveira commented Jan 9, 2016

ok moyamo thanks , now the error not exist, but not send to sms code

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

Does the bot ask you for a country code? Did you enter a country code? If so what was the bots response?

@fnaveira
Copy link

fnaveira commented Jan 9, 2016

yes 34 of spain , but the error log is:

2016-01-09 22:14:45,456 INFO  NetworkPluginServer: New backend 0xfc1100 connected. Current backend count=1
2016-01-09 22:14:45,457 INFO  NetworkPluginServer: PING to 0xfc1100 (ID=)
2016-01-09 22:14:45,458 INFO  NetworkPluginServer: Associating fnaveira@xxxxx with this backend
2016-01-09 22:14:48,810 INFO  NetworkPluginServer: PING to 0xfc1100 (ID=31470)
2016-01-09 22:15:02,882 INFO  NetworkPluginServer: Backend 0xfc1100 (ID=31470) disconnected. Current backend count=0
2016-01-09 22:15:02,882 ERROR NetworkPluginServer: Backend 0xfc1100 (ID=31470) disconnected (probably crashed) with active user fnaveira@xxxxx
2016-01-09 22:15:02,882 INFO  User: [email protected]: Disconnected from legacy network with error Internal Server Error, please reconnect.
2016-01-09 22:15:02,882 INFO  Component.RAW: RAW DATA OUT <message from="whatsapp.globalchat.org" to="fnaveira@xxxxxxx" type="chat"><body>Internal Server Error, please reconnect.</body><spectrumerror error="16" xmlns="http://spectrum.im/error">CONNECTION_ERROR_NETWORK_ERROR</spectrumerror></message>
2016-01-09 22:15:02,886 INFO  User: fnaveira@xxxxx: Destroying
2016-01-09 22:15:02,886 INFO  Component.RAW: RAW DATA OUT <presence from="whatsapp.xxxxx" to="fnaveira@xxxxxx" type="unavailable"/>

have you a email where can i send it these errors?

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

[email protected] also include backend/backend.log

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

In the password field type

register

Do not type your jabber password

@fnaveira
Copy link

fnaveira commented Jan 9, 2016

OK, OK 2016-01-09 22:46:00,540 INFO yowsup.common.http.warequest: {"status":"sent","length":6,"method":"sms","retry_after":1805} ,

now the bot prompts for the code country.

@moyamo
Copy link
Collaborator Author

moyamo commented Jan 9, 2016

Wait for the sms. When you get the SMS code type it into the bot window

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants