<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Get Bearer Token By Screen Name</title>
  <link rel="self" href="https://liferay.dev/ar/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120669397" />
  <subtitle>Get Bearer Token By Screen Name</subtitle>
  <id>https://liferay.dev/ar/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120669397</id>
  <updated>2026-06-03T05:30:08Z</updated>
  <dc:date>2026-06-03T05:30:08Z</dc:date>
  <entry>
    <title>Get Bearer Token By Screen Name</title>
    <link rel="alternate" href="https://liferay.dev/ar/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120669396" />
    <author>
      <name>amirsnw kaihi</name>
    </author>
    <id>https://liferay.dev/ar/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120669396</id>
    <updated>2021-03-08T08:42:30Z</updated>
    <published>2021-03-08T08:42:30Z</published>
    <summary type="html">&lt;p&gt;Using this http://localhost:8080/o/oauth2/token and giving the
  credential details with email address and password as parameter and it
  works giving me the token.&lt;br /&gt;reference: &lt;a
    href="https://liferay.dev/blogs/-/blogs/liferay-oauth-2-0-authorization-flows"&gt;this link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now i'm trying to change authentication type by email to
  authentication by screenname as this page says:&lt;br /&gt;
  &lt;a
    href="https://help.liferay.com/hc/en-us/articles/360018166351-Service-Security-Layers8166351-Service-Security-Layers"&gt;this link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;br /&gt;Calling &lt;em&gt;
    &lt;u&gt;http://localhost:8080/o/oauth2/token&lt;/u&gt;&lt;/em&gt; not working with
  email nor screenname and giving  me the following exceptions:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;giving email as parameter: username = &lt;a href="mailto:test@liferay.com"&gt;test@liferay.com&lt;/a&gt;&lt;/p&gt;
&lt;pre class="portlet-msg-info"&gt;Application {http://application.authenticationRest.portal.ivo.ir/}AuthenticationRestApplication has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: ERR_FAILED_LOGING_IN&lt;/pre&gt;
&lt;p&gt;giving screen name as parameter: username = test&lt;/p&gt;
&lt;pre class="portlet-msg-info"&gt;Application {http://application.authenticationRest.portal.ivo.ir/}AuthenticationRestApplication has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: No User exists with the key {companyId=20101, emailAddress=test}
&lt;/pre&gt;</summary>
    <dc:creator>amirsnw kaihi</dc:creator>
    <dc:date>2021-03-08T08:42:30Z</dc:date>
  </entry>
</feed>
