<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get 404 error while trying to send a request to https://my-tenant.us.qlikcloud.com/api/v1/users/me in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511011#M21937</link>
    <description>&lt;P&gt;hello, thanks for the reply. I am using the access token returned to me after the user is authenticated via Oauth. in my code I use /api/v1/users/me endpoint however when I look in the console logs of the error it shows me&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;/api/v1/users/{user_id} - this means it actually knows what id is associated with the token however I am still getting that 404 error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I dont use a API whatsoever because what is supposed to happen in the flow of is:&lt;BR /&gt;&lt;BR /&gt;1. user logs in via oauth&lt;BR /&gt;2. user now has access token&lt;BR /&gt;3. user directed to homepage&lt;BR /&gt;4.using the endpoint&amp;nbsp;/api/v1/users/me I want to get information such as email, firstname etc so I can display.&lt;BR /&gt;&lt;BR /&gt;Later on I want to be able to get a list of apps they have access to etc&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Mar 2025 13:58:22 GMT</pubDate>
    <dc:creator>jcampbel1</dc:creator>
    <dc:date>2025-03-21T13:58:22Z</dc:date>
    <item>
      <title>Get 404 error while trying to send a request to https://my-tenant.us.qlikcloud.com/api/v1/users/me</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2510986#M21931</link>
      <description>&lt;P&gt;I am getting an error when I call the endpoint&amp;nbsp;&lt;A href="https://my-tenant.us.qlikcloud.com/api/v1/users/me" target="_blank"&gt;https://my-tenant.us.qlikcloud.com/api/v1/users/me&lt;/A&gt;&amp;nbsp;in my code ( I use my company tenant instead of&amp;nbsp;&lt;A href="https://my-tenant.us.qlikcloud.com/api/v1/users/me" target="_blank"&gt;https://my-tenant.us.qlikcloud.com&lt;/A&gt;&amp;nbsp;in my code.)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    try {
      const userInfoUrl = 'https://my-tenant.us.qlikcloud.com/api/v1/users/me';
      const response = await fetch(userInfoUrl, {
        method: 'GET',
        headers: {
          'Authorization': `Bearer ${token}`,
        },&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I have confirmed that I pass in a valid token (I get token when logging in).&lt;BR /&gt;&lt;BR /&gt;When I go to the endpoint&amp;nbsp;&lt;A href="https://my-tenant.us.qlikcloud.com/api/v1/users/me" target="_blank"&gt;https://my-tenant.us.qlikcloud.com/api/v1/users/me&lt;/A&gt;&amp;nbsp;in google, it works. So why doesn't it work in my code?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 11:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2510986#M21931</guid>
      <dc:creator>jcampbel1</dc:creator>
      <dc:date>2025-03-21T11:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get 404 error while trying to send a request to https://my-tenant.us.qlikcloud.com/api/v1/users/me</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511005#M21932</link>
      <description>&lt;P&gt;What are you trying to achieve?&lt;BR /&gt;&lt;A href="https://my-tenant.us.qlikcloud.com/api/v1/users/me" target="_blank" rel="nofollow noopener noreferrer"&gt;/api/v1/users/me&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;endpoint will trigger e redirect, that's why it works in browser and not from your code.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511005#M21932</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2025-03-21T13:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get 404 error while trying to send a request to https://my-tenant.us.qlikcloud.com/api/v1/users/me</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511008#M21935</link>
      <description>&lt;P&gt;I am not a JavaScript guy so hopefully the code is usable as a base, but I can't explain a 404. Considerations:&lt;/P&gt;
&lt;P&gt;- /api/v1/users/me will return a 301 and redirect you to /api/v1/users/{user_id}.&lt;/P&gt;
&lt;P&gt;- You're not specifying where the bearer token is coming from. In my code I am using an API key from Qlik Cloud. Removal of the "Developer" role will result in a 401 (pre-auth unauthorized), which makes sense. Still not 404. Are you using a JWT IDP to generate the bearer token?&lt;/P&gt;
&lt;P&gt;Example code which works on my tenant:&lt;/P&gt;
&lt;PRE&gt;var https = require('https');

var options = {
   hostname: '&amp;lt;my_tenant&amp;gt;',
   port: 443,
   path: '/api/v1/users/me',
   method: 'GET',
   headers: {
      'Authorization' : ' Bearer &amp;lt;my_api_key&amp;gt;'
   }
};

https.get(options, function(response) {
   console.log("Got response: " + response.statusCode);
   response.on("data", function(chunk) {
      console.log("BODY: " + chunk);  
   });
   }).on('error', function(e) {
      console.log("Got error: " + e.message);
});
&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511008#M21935</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2025-03-21T13:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get 404 error while trying to send a request to https://my-tenant.us.qlikcloud.com/api/v1/users/me</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511010#M21936</link>
      <description>&lt;P&gt;i am creating a POC type of project. I need to login via oauth (which works as I am returned back a token and redirected) once on the page '/homepage' I want to call that endpoint that however when the endpoint is being called using the code shown above with a valid token. I am getting the 404 error&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511010#M21936</guid>
      <dc:creator>jcampbel1</dc:creator>
      <dc:date>2025-03-21T13:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get 404 error while trying to send a request to https://my-tenant.us.qlikcloud.com/api/v1/users/me</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511011#M21937</link>
      <description>&lt;P&gt;hello, thanks for the reply. I am using the access token returned to me after the user is authenticated via Oauth. in my code I use /api/v1/users/me endpoint however when I look in the console logs of the error it shows me&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;/api/v1/users/{user_id} - this means it actually knows what id is associated with the token however I am still getting that 404 error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I dont use a API whatsoever because what is supposed to happen in the flow of is:&lt;BR /&gt;&lt;BR /&gt;1. user logs in via oauth&lt;BR /&gt;2. user now has access token&lt;BR /&gt;3. user directed to homepage&lt;BR /&gt;4.using the endpoint&amp;nbsp;/api/v1/users/me I want to get information such as email, firstname etc so I can display.&lt;BR /&gt;&lt;BR /&gt;Later on I want to be able to get a list of apps they have access to etc&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-404-error-while-trying-to-send-a-request-to-https-my-tenant/m-p/2511011#M21937</guid>
      <dc:creator>jcampbel1</dc:creator>
      <dc:date>2025-03-21T13:58:22Z</dc:date>
    </item>
  </channel>
</rss>

