Closed n8fr8 closed 3 years ago
GET https://textsecure-service.whispersystems.org/v1/accounts/sms/code/+1XXXXXXXXXX GET https://textsecure-service.whispersystems.org/v1/accounts/sms/code/+1XXXXXXXXXX 402 Error 2019-10-16T17:18:31.348Z error undefined name=HTTPError code=402 response="
Problem accessing /v1/accounts/sms/code/+1XXXXXXXXXX. Reason:
Payment Required
Hey @n8fr8,
At least at the moment, I was not able to reproduce this error with the library's test client. Using the command:
NODE_ENV=production DEBUG=libsignal-service:* STORE=./storage node ./examples/client.js requestSMS +1XXXXXXXXXX password
I had the output:
libsignal-service:WebAPI GET https://textsecure-service.whispersystems.org/v1/accounts/sms/code/+1XXXXXXXXXX +0ms
(node:2569125) ExperimentalWarning: The fs.promises API is experimental
libsignal-service:ProtocolStore ProtocolStore: Finished caching identityKeys data +0ms
libsignal-service:ProtocolStore ProtocolStore: Finished caching sessions data +0ms
libsignal-service:ProtocolStore ProtocolStore: Finished caching preKeys data +0ms
libsignal-service:ProtocolStore ProtocolStore: Finished caching signedPreKeys data +1ms
libsignal-service:ProtocolStore ProtocolStore: Finished caching configuration data +0ms
libsignal-service:ProtocolStore ProtocolStore: Finished caching groups data +0ms
libsignal-service:WebAPI GET https://textsecure-service.whispersystems.org/v1/accounts/sms/code/+1XXXXXXXXXX 200 Success +137ms
Sent verification code.
And received the code at the corresponding phone number (judging from the URL I'm guessing you're trying to get the SMS code as the first step of the registration) and was able to complete registration.
402: Payment Required
is not an error defined in the client code, so it must be in the server. Looking at the server code, the only place where I see an HTTP code 402 being sent is https://github.com/signalapp/Signal-Server/blob/109a5b47483d70d2055fab00b54edb6a68fdd7c8/service/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java#L156
Judging from that, it looks like you're probably being identified as an abusive host and need to fill out a captcha. I'm not 100% sure that's tied to the phone number or to your IP address. If IP, then you could try accessing https://signalcaptchas.org/registration/generate.html in the browser from the same originating IP as you're experiencing the error. If phone number, you could try registering via an official client using that phone number, and seeing if that allows you to complete the captcha.
I hope that helps! Let me know if there's anything more I can do to assist.
We are getting a "payment required" error message back from the server. Can you verify the lib is stil
{"name":"HTTPError","code":402,"response":"\n
\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\nHTTP ERROR 402
\nProblem accessing /v1/accounts/sms/code/+1XXXXXXXXXX. Reason:\n
\n\n\n","level":"error","timestamp":"2019-10-16T17:18:31.348Z"}