Code isn't coming to my phone after calling "request_sms_code" function
I've implemented the "request_sms_code" function (and, of course, all other stuff that is required for it). The problem is that after calling the "v6_auth_agreement_code" function responses look like successful:
{"status_code":0,"status":"success","message":"","data":null}")
but actually a confirmation code isn't coming to a phone number specified. Do you have any ideas why it happens?
Thanks in advance.
Hi, check how you are passing phone number to "request_sms_code", it must start with the country code, for Russia, for example, you must write number like that: 79202600211.
I`v just checked functions "request_sms_code" and "send_sms_code", everything works fine.
From my expierience with Numbuster's api I can tell that sometimes they just don't send sms, so if you didn`t recieved sms, try again after 1-2 minutes, also try another number, free online numbers...
And yeah... request_sms_code doesn't need nothing else, just write something like that:
api = Numbuster() api.request_sms_code('79219511844') code = input('Code: ') api.send_sms_code('79219511844',code) print(api.access_token)
Thanks for your quick answers! Before I sent phone numbers with "+" prefix, just checked without "+", this didn't help. To be more precise, my tests were done for Ukrainian numbers, I'll try other numbers later.
Just to be sure I'm doing everything correctly: are you also receiving the following responses:
{"status_code":0,"status":"success","message":"","data":null}")
?
Yep. Everything ok, especialy if you are using functions which implemented in api.
There's realy problem with Urkranian/USA/Greek numbers, properly works only with russian numbers, even with the app running on the emulator.
I tried to use different services with Russian numbers for free SMS and still not able to receive a code.
Actually I'm not running your code, the function "request_sms_code" (and all the relevant functions) was implemented in Swift programming language and it is sent from iPhone application. I understand something is wrong in my setup. What is weird is that my calls receive the same successful responses as your Python API. I'm continue working on this issue when have time.
I'v just checked "v6_auth_agreement_code()" and looks like api allways returns {"status_code":0,"status":"success","message":"","data":null}"), even when you send wrong key, so check your implementation of "v6_auth_get()". And if you want, you can send me your implementation of that functions, I will try to help you.
Also check that function "another_profiles_without_code".
Oh, I didn't implement "another_profiles_without_code" since thought it is not required. Will add this function. I think another potentially problematic place could be "signatures.get_cnonce()": how much important is to randomize a nonce each time?
Of course I'll show you my code, need some time to prepare it. Again thanks for your help.
Yeahhh, "#Can be deleted, but meh..." was my little sarcastic joke, sorry :). You can allways use even that cnonce o5oorrrlBlbWKHRVuH7lBQdVCQEVKeXeTkAyA9H6FY8DT904sq , so it's not really necessary to randomise it every time, but Numbuster can start checking cnonce, so better randomise it at least ones, when program starts and use it for every request. And again, sorry for "#Can be deleted, but meh...". "another_profiles_without_code" is the most important function in "request_sms_code" if you want, you can even delete v6_auth_get and v6_auth_agreement_code and use only "another_profiles_without_code"
Ah, you don't need to say "sorry", I had to understand it was a joke :). Actually it doesn't matter, I'm implementing "another_profiles_without_code" now...
"another_profiles_without_code" is successful, but sends empty response {}. Is it correctly? Should "another_profiles" be implemented as well?
That's correct, api just sends back empty response. "another_profiles_without_code" is the only one function that requests sms from server, so nope, you don't need to implement "another_profiles"
So, If I understand correctly, "another_profiles_without_code" is the only method which is required to receive SMS, right? This function is very simple and actually it is a POST HTTP request to URL "https://api.numbuster.com/api/old4a27f7a4025447ee5560a49bc5bcde34/profiles/without-code" with body {"phone" : "xxxxxxxxxx"}.
Correct. Don't forget about headers: 'User-Agent'='okhttp/3.9.1' and 'Content-Type'='application/x-www-form-urlencoded' ,just in case...
Decided to send this API request using Postman - the same result: response is empty, but there is no code. It makes me crazy.
Is it ok that a part of URL "https://api.numbuster.com/api/old4a27f7a4025447ee5560a49bc5bcde34/profiles/without-code" is a hardcoded string "old4a27f7a4025447ee5560a49bc5bcde34"?
Yeah, that's real url for request, I don't know what '4a27f7a4025447ee5560a49bc5bcde34' exactly means(probably md5 hash, because that's obviously bytes), but it doesn't matter.
So yeah, answer for your question. Yes, that's hardcoded string in Numbuster's app.
Can I send you an import from Postman for review?
Yep.
Or you can just post code to pastebin.
https://drive.google.com/open?id=1vARfkECUttW7h1sOnVivgvKED4LNFPa3
https://api.numbuster.com/api/v6/auth/agreement_code?timestamp=1580586177&signature=5e04d26fce606be6caca214397b0c7edd2fbb3e0aa13756eb8e2b7de446080e0&cnonce=o5oorrrlBlbWKHRVuH7lBQdVCQEVKeXeTkAyA9H6FY8DT904sq&= that '=' on the end just mistake? And did the "another_profiles_without_code" work?
I don't know why "=" is in the end of the url, this is another example of url for "v6_auth_agreement_code":
https://api.numbuster.com/api/v6/auth/agreement_code?×tamp=1580920550&signature=d0796f9d0efe736e97079a21596df0b487bd4edd3f7f24279dd8cb49370b5538&cnonce=o5oorrrlBlbWKHRVuH7lBQdVCQEVKeXeTkAyA9H6FY8DT904sq
And yes, the "another_profiles_without_code" works and receives an empty response.
So, all functions wrote correctly. Did you recieve sms code after calling "another_profiles_without_code"?
No, and this is a problem.
Are you able to send only "another_profiles_without_code" and receive an SMS?
Yes, I checked recently. But there's realy big problem with Numbuter's server, it just doesn't send sms sometimes(I even tried to request sms from emulator, real phones, it doesn't help so much), try that numbers https://onlinesim.ru/en .
I`v just checked, and Numbuster is updated there's one more function for registration, so I will reverse new version and update api.