If the registration API of the wordpress plugin WPML / OTGS returns an error 403 or "invalid response" try to add an user-agent header to the api call.
wp_remote_post()
seems to send w/o user-agent - perhaps depending on your installation/server-config.
Add this php snippet to your functions.php or some custom plugin:
function my_http_request_args($args) {
$args['user-agent'] = 'WordPress';
return $args;
}
add_filter('http_request_args', 'my_http_request_args');
You may change the string 'WordPress' into whatever. "Something" worked as fine as "curl/7.74.0".
Perhaps you could also use the http_header_useragent
filter instead of http_request_args
. Haven't tested that.
192 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ),
https://developer.wordpress.org/reference/classes/wp_http/request/