cancel
Showing results for 
Search instead for 
Did you mean: 

XSOData error in XSA when called using Postman

Ajinkya_Jadhav
Participant
471

Hello Experts,

I have created a table in my DB module. In my NodeJs module I have one xsodata as follows:

service {
  "tinyworld.tinydb::myview" as "euro" keys generate local "ID";
}

This xsodata exposes my table data as a OData service. I have one UI module on top of this nodeJS module and using app routers I am calling the OData service using my UI module.

The issue is when I am triggering it using my browser(Chrome or any other), it works fine. I gives me expected result. But when I am tring to trigger the OData service using Postman Tool, it returns success code 200, but the response is as follows which is not expected:

<html>


<head>
	<link rel="shortcut icon" href="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />
	<script>
		document.cookie="fragmentAfterLogin="+encodeURIComponent(location.hash)+";path=/";document.cookie="locationAfterLogin="+encodeURIComponent(location.href.split('#')[0].split(location.host)[1])+";path=/";document.cookie="signature=ElU1Fx%2BP8OoEz4v%3D;path=/";location="https://uaa-server.xsa.<mysystemhostname>:30033/uaa-security/oauth/authorize?response_type=code&client_id=sb-tinyworld46f03587-665b-4a6e-b047-d6b494a6f32e&redirect_uri=https%3A%2F%2F2o8kdhc7zzcw8mgyld-master-tinyui1.<mysystemhost>%3A30033%2Flogin%2Fcallback"
	</script>
</head>


</html>

This is a HTML page but I want to receive the OData service response. Could you please suggest me what is to be done?

Thank you.

Best Regards,

Ajinkya Jadhav

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

The HTML response you get is the redirection to the Login endpoint.

You have to get an OAuth access token upfront and provide it when you call the OData service.

Ajinkya_Jadhav
Participant
0 Kudos

Thanks for responding Florian.

I have two questions.

1. Is it possible to have basic authentication to call the OData service?

2. How to get an OAuth access token?

Can you share any blog or documentation for the same?

pfefferf
Active Contributor
Ajinkya_Jadhav
Participant
0 Kudos

Thanks Florian,

Great Blog!

0 Kudos

Hi Florian,
How do I get an Oauth access token and provide it?
Can you provide a link if there is one?

Thanks :D,

Krishna

Answers (0)