# Invite by API - no response

**URL:** <https://meta.discourse.org/t/invite-by-api-no-response/87204>\
**Category:** Product Support\
**Created:** [5월 10, 2018, 8:00오후 UTC](https://meta.discourse.org/t/invite-by-api-no-response/87204 "2018-05-10T20:00:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Werner](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@Sergio\_Werner](https://meta.discourse.org/u/Sergio_Werner)\
**Post date:** [5월 10, 2018, 8:00오후 UTC](https://meta.discourse.org/t/invite-by-api-no-response/87204/1 "2018-05-10T20:00:56Z")

</div>

What am I doing wrong? I get no response from the API.

```plaintext
<?php

	$query = array(' [
		"email" => "test@gmail.com",
		"group_names" => "",
		"custom_message" => "" ]');	
		
    $paramArray['api_key'] = '....................';
    $paramArray['api_username'] = "admin";
	$url = sprintf
		(
		'%s://%s%s?%s',
		'https', 
		'forum.exemple.com/', 
		'invites', 
		http_build_query($paramArray)
		);	
		

	$invite = curl_init();
	
	curl_setopt($invite, CURLOPT_URL, $url);
	curl_setopt($invite, CURLOPT_POSTFIELDS, http_build_query($query));
	curl_setopt($invite, CURLOPT_RETURNTRANSFER, true);
	
	$resp = curl_exec($invite);
	curl_close($invite);
	
print_r($resp);
		
?>

```

---

_[View the full topic](https://meta.discourse.org/t/invite-by-api-no-response/87204)._
