<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[where to find the &#x2F;api&#x2F;status response?]]></title><description><![CDATA[<p dir="auto">I am trying to register my first new user via the API. Here is my little bit of code:<br />
$request = array();<br />
$request["applicationId"] = $_SESSION['applicationID'];<br />
$request["loginId"] = $post_array['employee_email'];<br />
$request["password"] = "abc123";<br />
$result = $_SESSION['client']-&gt;register($post_array['employee_email'],$request);<br />
if (!$result-&gt;wasSuccessful()) {<br />
echo "error";<br />
This is returning a status of zero. Here is the ClientResponse:<br />
[errorResponse] =&gt;<br />
[exception] =&gt;<br />
[method] =&gt; POST<br />
[request] =&gt; Array<br />
(<br />
[applicationId] =&gt; 32688330-1630-4e0d-a4de-8ae45c3ca527<br />
[loginId] =&gt; <a href="mailto:richb201@gmail.com" rel="nofollow ugc">richb201@gmail.com</a><br />
[password] =&gt; abc123<br />
)</p>
<pre><code>[successResponse] =&gt; 
[status] =&gt; 0
</code></pre>
<p dir="auto">)</p>
<p dir="auto">How can I see the actual response so I can fix this? BTW, I am in Docker and using PHP client.</p>
]]></description><link>https://fusionauth.io/community/forum/topic/470/where-to-find-the-api-status-response</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 21:18:59 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/470.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Oct 2020 04:52:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Sat, 24 Oct 2020 03:30:09 GMT]]></title><description><![CDATA[<p dir="auto">solved. I needed to type DELETE.</p>
]]></description><link>https://fusionauth.io/community/forum/post/1516</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1516</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Sat, 24 Oct 2020 03:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Fri, 23 Oct 2020 13:31:43 GMT]]></title><description><![CDATA[<p dir="auto">Thx. I am working on the AWS secrets "angle" and I managed to get a user registered via the API :).  One question regarding testing? I see that even though I have deleted a user via the console, I can't add that same user again (get a 400). How do you deal with this when testing a new system? Once a user has been registered is there no way to delete them so they can be registered again (and again and again)  ?</p>
]]></description><link>https://fusionauth.io/community/forum/post/1506</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1506</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Fri, 23 Oct 2020 13:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Thu, 22 Oct 2020 21:01:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/279">@richb201</a> said in <a href="/community/forum/post/1499">where to find the /api/status response?</a>:</p>
<blockquote>
<p dir="auto">This will allow me to get the data that I need to customize the login page. But i am scared to keep clientID and clientSecret in a page accessible to the world. The page is a .php page, so you said I might be OK with it having the clientSecret in it.</p>
</blockquote>
<p dir="auto">Ah, you should pull that value from the environment (if you are deploying via heroku) or AWS secrets manager (if deploying to AWS) or some other secured manner. I'm not sure how you are hosting the app, but you can ask your hosting provider how they recommend storing app secrets.</p>
<blockquote>
<p dir="auto">'message' =&gt; 'Your request is missing the Registration information as JSON in the entity-body.',</p>
</blockquote>
<p dir="auto">If you want to register a user, you need to provide a <code>registration</code> key. That's what the error message is telling you.</p>
<p dir="auto">I find it helpful to pull up the API documentation and look at the sample request and response JSON docs. That's what FusionAuth is expecting, and all the client libs do is wrap that up in a nice, language specific interface.</p>
<p dir="auto">HTH.</p>
]]></description><link>https://fusionauth.io/community/forum/post/1500</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1500</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 22 Oct 2020 21:01:42 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Thu, 22 Oct 2020 20:10:05 GMT]]></title><description><![CDATA[<p dir="auto">Inside the oauth login URL I need to customize the text. To do that I need to get the access token with the following:</p>
<p dir="auto">$provider = new \League\OAuth2\Client\Provider\GenericProvider([<br />
'clientId'                =&gt; $client_id,<br />
'clientSecret'            =&gt; $client_secret,<br />
'redirectUri'             =&gt; $redirect_uri,<br />
'urlAuthorize'            =&gt; $fa_url.'/oauth2/authorize',<br />
'urlAccessToken'          =&gt; $fa_url.'/oauth2/token',<br />
'urlResourceOwnerDetails' =&gt; $fa_url.'/oauth2/userinfo'<br />
]);</p>
<p dir="auto">$accessToken = $provider-&gt;getAccessToken('authorization_code', ['code' =&gt; $_GET['code'&rsqb;&rsqb;);</p>
<p dir="auto">This will allow me to get the data that I need to customize the login page. But i am scared to keep clientID and clientSecret in a page accessible to the world. The page is a .php page, so you said I might be OK with it having the clientSecret in it.</p>
<p dir="auto">Also now that I am getting an error code <img src="https://fusionauth.io/community/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=rcgg4tg866g" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> I can see that the error is not having the data in json format.</p>
<p dir="auto">stdClass::__set_state(array(<br />
'code' =&gt; '[missing]registration',<br />
'message' =&gt; 'Your request is missing the Registration information as JSON in the entity-body.',</p>
<p dir="auto">So I modified this line of the sample code to json encode the array. But I still get the error.<br />
$request = array();<br />
$request["applicationId"] = $applicationID;<br />
$request["loginId"] = "me";<br />
$request["password"] = "abc123";<br />
$requestJ = json_encode($request);   //convert the array into json<br />
$result = $client-&gt;register("",$requestJ);</p>
]]></description><link>https://fusionauth.io/community/forum/post/1499</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1499</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Thu, 22 Oct 2020 20:10:05 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Thu, 22 Oct 2020 19:22:53 GMT]]></title><description><![CDATA[<p dir="auto">I'm not sure how your docker is set up, but if the php code is running in a docker container as well, it won't know what "localhost" refers to. You also have to make sure that port 9011 is mapped which is this section of the docker file:</p>
<pre><code>    ports:
      - 9011:9011
</code></pre>
<p dir="auto">I guess the first step I'd take to troubleshoot this would be to see if I could visit localhost:9011 from my browser to see if FusionAuth in docker was accessible from my local machine.</p>
<blockquote>
<p dir="auto">Also, we discussed putting my client secret in the Oauth login URL. I was concerned about security when doing that. Can you please recommend an easy, more secure place to keep those fields?</p>
</blockquote>
<p dir="auto">I don't recall that discussion, but in general you shouldn't provide the client secret in a url. Can you refresh my memory <img src="https://fusionauth.io/community/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=rcgg4tg866g" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> ?</p>
]]></description><link>https://fusionauth.io/community/forum/post/1497</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1497</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 22 Oct 2020 19:22:53 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Thu, 22 Oct 2020 11:23:33 GMT]]></title><description><![CDATA[<p dir="auto">Solved (I think). This line above needed to be changed<br />
from<br />
$client = new FusionAuth\FusionAuthClient($apiKey, "<a href="http://localhost:9011" rel="nofollow ugc">http://localhost:9011</a>");<br />
to<br />
$client = new FusionAuth\FusionAuthClient( $apiKey, "<a href="http://fusionauth:9011" rel="nofollow ugc">http://fusionauth:9011</a>");</p>
<p dir="auto">Now I get the error code lijke in your example that will allow me to fix this thing. In your example above you use localhost too. So how does yours work when mine does not? I am using Docker btw. If using fusionauth:9011 will cause me other headaches, please let me know before I break out the champagne!</p>
<p dir="auto">Also, we discussed putting my client secret in the Oauth login URL. I was concerned about security when doing that. Can you please recommend an easy, more secure place to keep those fields?</p>
]]></description><link>https://fusionauth.io/community/forum/post/1494</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1494</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Thu, 22 Oct 2020 11:23:33 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Mon, 19 Oct 2020 22:02:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/279">@richb201</a> said in <a href="/community/forum/post/1470">where to find the /api/status response?</a>:</p>
<blockquote>
<p dir="auto">While I have your attention, I noticed that the passwordless login link expires quickly. Is that time setable?</p>
</blockquote>
<p dir="auto">Yes. You can do it in the tenant settings under the advanced tab, or via the api; it's the <code>passwordlessLoginTimeToLiveInSeconds</code> setting.</p>
]]></description><link>https://fusionauth.io/community/forum/post/1486</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1486</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Mon, 19 Oct 2020 22:02:54 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Mon, 19 Oct 2020 22:01:14 GMT]]></title><description><![CDATA[<p dir="auto">Ah, I see the issue, I think, <a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/279">@richb201</a></p>
<p dir="auto">If you are trying to register, you want to build a json object as documented <a href="https://fusionauth.io/docs/v1/tech/apis/registrations/#create-a-user-registration-for-an-existing-user" rel="nofollow ugc">here</a></p>
<p dir="auto">You want to post to this url: <code>/api/user/registration/{userId}</code>. The userId will be something like <code>6fdacf40-828d-4aaa-8a5a-2119bee94b67</code> but it looks like you are using the email address of the user.</p>
<p dir="auto">You also don't need the <code>loginId</code> or the <code>password</code> field (because the user already exists). If the user didn't exist, you'd want to use the fields documented <a href="https://fusionauth.io/docs/v1/tech/apis/registrations/#create-a-user-and-registration-combined" rel="nofollow ugc">here</a></p>
<p dir="auto">I didn't try to run your code in the past, but running this now gives me an error: <code>[couldNotConvert]userId</code>.</p>
<p dir="auto">client.php:</p>
<pre><code>&lt;?php 

require __DIR__ . '/vendor/autoload.php';

$apiKey = "SNjNZj8jz4A_5BeL07pF901nwlLxRQ3CK6shpuIFQkg";
$client = new FusionAuth\FusionAuthClient($apiKey, "http://localhost:9011");

$applicationId = "85a03867-dccf-4882-adde-1a79aeec50df";

$request = array();
$request["applicationId"] = $applicationId;
#$request["loginId"] = "testanother3@example.com";
$result = $client-&gt;register("testanother2@example.com",$request);
echo var_export($result, true);

</code></pre>
<p dir="auto">composer.json:</p>
<pre><code>{
    "require": {
      "fusionauth/fusionauth-client": "^1.19"
    }
}
</code></pre>
<pre><code>composer install
php client.php
</code></pre>
<p dir="auto">results in this:</p>
<pre><code>FusionAuth\ClientResponse::__set_state(array(
   'errorResponse' =&gt; 
  (object) array(
     'fieldErrors' =&gt; 
    (object) array(
       'registration' =&gt; 
      array (
        0 =&gt; 
        (object) array(
           'code' =&gt; '[missing]registration',
           'message' =&gt; 'Your request is missing the Registration information as JSON in the entity-body.',
        ),
      ),
       'userId' =&gt; 
      array (
        0 =&gt; 
        (object) array(
           'code' =&gt; '[couldNotConvert]userId',
           'message' =&gt; 'Invalid userId [testanother2@example]. This must be a valid UUID String (e.g. 25a872da-bb44-4af8-a43d-e7bcb5351ebc).',
        ),
      ),
    ),
  ),
   'exception' =&gt; NULL,
   'method' =&gt; 'POST',
   'request' =&gt; 
  array (
    'applicationId' =&gt; '85a03867-dccf-4882-adde-1a79aeec50df',
  ),
   'successResponse' =&gt; NULL,
   'status' =&gt; 400,
))
</code></pre>
<p dir="auto">Is this not what you are seeing if you run my code?</p>
]]></description><link>https://fusionauth.io/community/forum/post/1485</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1485</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Mon, 19 Oct 2020 22:01:14 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Sun, 18 Oct 2020 15:38:36 GMT]]></title><description><![CDATA[<p dir="auto">While I have your attention, I noticed that the passwordless login link expires quickly. Is that time setable?</p>
<p dir="auto">Also, I am trying to use this as the URL: <a href="http://localhost/index.php/Configure/MyFormEmployees" rel="nofollow ugc">http://localhost/index.php/Configure/MyFormEmployees</a> but the menu won't seem to store that. That path works fine from my browser address line.</p>
]]></description><link>https://fusionauth.io/community/forum/post/1470</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1470</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Sun, 18 Oct 2020 15:38:36 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Fri, 16 Oct 2020 20:25:35 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/community/forum/assets/uploads/files/1602878247125-screenshot-from-2020-10-16-15-56-54.png" alt="Screenshot from 2020-10-16 15-56-54.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Logic check: Since the same code works in your environment isn't it likely that there is something wrong with the setup of my application? The lack of a decent error code is an issue.</p>
]]></description><link>https://fusionauth.io/community/forum/post/1466</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1466</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Fri, 16 Oct 2020 20:25:35 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Fri, 16 Oct 2020 17:38:36 GMT]]></title><description><![CDATA[<p dir="auto">That's interesting. I wouldn't think it would be an error. Can you do an export of the $result object and share that?</p>
<pre><code>$apiKey = "s-S2l2DNOpEgjjDlZ2MXnU4QGARj8UszS_BVnvugGoc";
        $client = new FusionAuth\FusionAuthClient( $apiKey, "http://localhost:9011");
        $applicationID="32688330-1630-4e0d-a4de-8ae45c3ca527";

        $request = array();
        $request["applicationId"] = $applicationID;
        $request["loginId"] = "richb201@gmail.com";
        $request["password"] = "abc123";
        $result = $client-&gt;register("richb201@gmail.com",$request);
        echo var_export($result, true);


        if (!$result-&gt;wasSuccessful()) {
            echo "error";
        } else {
            echo var_export($result-&gt;successResponse, true);
       }
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/post/1462</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1462</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Fri, 16 Oct 2020 17:38:36 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Fri, 16 Oct 2020 14:36:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/20">@dan</a> said in <a href="/community/forum/post/1442">where to find the /api/status response?</a>:</p>
<blockquote>
<p dir="auto">} else {<br />
echo var_export($result-&gt;successResponse, true);<br />
}</p>
</blockquote>
<p dir="auto">error. I also tried a different email address. I also got an error. Could there be an issue with using  $request["loginId"] = "<a href="mailto:richb201@gmail.com" rel="nofollow ugc">richb201@gmail.com</a>" or register("<a href="mailto:richb201@gmail.com" rel="nofollow ugc">richb201@gmail.com</a>" ?</p>
]]></description><link>https://fusionauth.io/community/forum/post/1456</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1456</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Fri, 16 Oct 2020 14:36:47 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Wed, 14 Oct 2020 23:26:30 GMT]]></title><description><![CDATA[<p dir="auto">What does adding the else statement print?</p>
<pre><code>$apiKey = "s-S2l2DNOpEgjjDlZ2MXnU4QGARj8UszS_BVnvugGoc";
        $client = new FusionAuth\FusionAuthClient( $apiKey, "http://localhost:9011");
        $applicationID="32688330-1630-4e0d-a4de-8ae45c3ca527";

        $request = array();
        $request["applicationId"] = $applicationID;
        $request["loginId"] = "richb201@gmail.com";
        $request["password"] = "abc123";
        $result = $client-&gt;register("richb201@gmail.com",$request);
        if (!$result-&gt;wasSuccessful()) {
            echo "error";
        } else {
            echo var_export($result-&gt;successResponse, true);
       }
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/post/1442</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1442</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 14 Oct 2020 23:26:30 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Wed, 14 Oct 2020 13:44:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/279">@richb201</a> said in <a href="/community/forum/post/1424">where to find the /api/status response?</a>:</p>
<blockquote>
<p dir="auto">$request = array();</p>
</blockquote>
<p dir="auto">Here you go. I am trying to register a user (<a href="mailto:richb201@gmail.com" rel="nofollow ugc">richb201@gmail.com</a>). When I run this I get successResponse=NULL. As I alluded to, <a href="mailto:richb201@gmail.com" rel="nofollow ugc">richb201@gmail.com</a>, was already registered via the console. Albeit, with a different userid.</p>
<pre><code>$apiKey = "s-S2l2DNOpEgjjDlZ2MXnU4QGARj8UszS_BVnvugGoc";
        $client = new FusionAuth\FusionAuthClient( $apiKey, "http://localhost:9011");
        $applicationID="32688330-1630-4e0d-a4de-8ae45c3ca527";

        $request = array();
        $request["applicationId"] = $applicationID;
        $request["loginId"] = "richb201@gmail.com";
        $request["password"] = "abc123";
        $result = $client-&gt;register("richb201@gmail.com",$request);
        if (!$result-&gt;wasSuccessful()) {
            echo "error";
        }
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/post/1438</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1438</guid><dc:creator><![CDATA[richb201]]></dc:creator><pubDate>Wed, 14 Oct 2020 13:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to where to find the &#x2F;api&#x2F;status response? on Tue, 13 Oct 2020 03:40:24 GMT]]></title><description><![CDATA[<p dir="auto">Hiya,</p>
<p dir="auto">Can you post your entire code (or a simplified version of it) to github or as a zip file here so I can download it and run it? I'm not quite sure what is going on.</p>
]]></description><link>https://fusionauth.io/community/forum/post/1432</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/1432</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 13 Oct 2020 03:40:24 GMT</pubDate></item></channel></rss>