D-Trox Posted September 19, 2022 Posted September 19, 2022 (edited) Hi I have a problem with sending custom fields via API. Spaces are not taken into account. I have to make an HTTP request in LUA and as we have to put the custom field in the link, then the spaces break the sending. example: this works : 'WEBSITE/api/core/members/1?key=XXXXXXXXXXXXXXXXXXX&customFields[5]=<b>MyNameIs</b>' but this does not work: WEBSITE/api/core/members/1?key=XXXXXXXXXXXXXXXXXXX&customFields[5]=<b>My Name Is</b>' WEBSITE/api/core/members/1?key=XXXXXXXXXXXXXXXXXXX&customFields[5]=<b>My Name Is</b>' is there any other more functional way to send via API for customs field or any solution? Or mayby a way to pass information in a json body ? Thank you Edited September 19, 2022 by D-Trox
Solution Jim M Posted September 19, 2022 Solution Posted September 19, 2022 You will want to URL encode anything in an URL parameter. Marc, D-Trox, Senior2323 and 1 other 3 1
D-Trox Posted September 21, 2022 Author Posted September 21, 2022 Sorry to re-open this one but now yesterday the call work but today it not working anymore. i receive error 403 but without any other tips. have you a idea of what it can be ? thank you
Marc Posted September 21, 2022 Posted September 21, 2022 You would need to check with your hosting company as 403 is an access denied message
D-Trox Posted September 21, 2022 Author Posted September 21, 2022 if i'm trying on postman it work , so it nis not the hosting service. is it possible that invision is blocking an IP or something like that after too many calls ? I making the call from the same ip but from another port. I mean that I have a script in my game server hosted on my dedicated server, which makes API calls to the invision site which is hosted on the same ip But it was working before yesterday
Daniel F Posted September 21, 2022 Posted September 21, 2022 8 minutes ago, D-Trox said: if i'm trying on postman it work , so it nis not the hosting service. is it possible that invision is blocking an IP or something like that after too many calls ? I making the call from the same ip but from another port. I mean that I have a script in my game server hosted on my dedicated server, which makes API calls to the invision site which is hosted on the same ip But it was working before yesterday You should check your API Logs ( ACP => System => API => REST API Logs ) to see if the requests are blocked.
D-Trox Posted September 21, 2022 Author Posted September 21, 2022 i have nothing in the logs I got something yesterday because i try some call with a wrong key. And after nothing pass anymore , so i'm trying to know what can causing this.
D-Trox Posted September 21, 2022 Author Posted September 21, 2022 i ting somewhere has block the call or the firewall block this one. because i made other , like get google and it work its only the one go to the website.
Jim M Posted September 21, 2022 Posted September 21, 2022 As you are self-hosted, you would want to check with your hosting provider if they have also blocked your IP address.
D-Trox Posted September 22, 2022 Author Posted September 22, 2022 hi I contact my provider and made some test with them and nothing are block. I made call from console of the dedicated server and it work. i ping the ip and the port of the game server and it pass. The dedicated server does not seem to block calls and the ports in question are not blocked either. Sure it not have somewhere can be block on invision ? A ip or a Port ? thank you
Jim M Posted September 22, 2022 Posted September 22, 2022 You can check in ACP -> Members -> Ban Settings, these would be the only IP bans which we have in the software. D-Trox 1
Recommended Posts