SAP-samples / cloud-cap-samples-java

A sample application that demonstrates the features of the Java SDK for the SAP Cloud Application Programming Model.
https://cap.cloud.sap
Apache License 2.0
142 stars 142 forks source link

A 401 error occurred when accessing the link. #316

Closed fenrir-liutiecheng closed 6 months ago

fenrir-liutiecheng commented 6 months ago

After deploying to SAP BTP using Cloud Foundry (cf), I receive a 401 error upon clicking the link. What could be the cause of this, and how should it be resolved? Also, how can I access the API normally? 401error

beckermarc commented 6 months ago

In CF XSUAA tokens are required for these endpoints. The index page is primarily intended for local development. In the cloud the app needs to be accessed via the approuter app URL, which ensures that an XSUAA login is performed.