0 votes

request("https://" + username + ":" + password + "@api.twilio.com/2010-04-01/Accounts/" + username + "/Messages.json")

The above code in the HTTP request node gives me the following error:
E 0:00:03.909 toint: Cannot represent (password)@api.twilio.com as integer, provided value is too big.
<C++ Error> Condition "integer > 2147483647 / 10" is true. Returned: sign == 1 ? 2147483647 : (-2147483647 - 1)
<C++ Source> core/ustring.cpp:1792 @ to
HTTPRequest.gd:20 @ onButtonpressed()
E 0:00:03.912 _parse
url: Condition "port < 1 || port > 65535" is true. Returned: ERRINVALIDPARAMETER
<C++ Source> scene/main/httprequest.cpp:81 @ _parseurl()
HTTPRequest.gd:20 @ onButton_pressed()

in Engine by (46 points)
edited by

Ive removed the username and password part and it successfully connected to the API,but it says I did not do authentication,so I used post method to pass in the authentication with the header as follow:


but it still does not work.....It says the same thing...
Can anyone please explain how do I connect to twilio REST API with Godot with authentication?????

1 Answer

0 votes

put it in a String varlike so ###### var uri = str(""https://",username,":",password,"@api.twilio.com/2010-04-01/Accounts/",username,"/Messages.json") this should work username and password are youre variables. happy holidays :)

by (20 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.