SAP Knowledge Base Article - Preview

3770030 - SAP Commerce Cloud Portal API Returns HTML Login Page Instead of JSON

Symptom

A REST client call (curl, Postman, custom script, CI/CD pipeline) to the SAP Commerce Cloud Portal API returns an HTML page instead of a JSON response.

The HTML response contains a redirect to the SAP IDP login page:

<html><head><script></script><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=mnVGqQBPNpk/DhtWVlSRwv/5NKs%3D;path=/;\";location=\"https://ycloud.accounts.ondemand.com/oauth2/authorize?response_type=code&client_id=18f9...

 Issue occurs regardless of the token being valid and the technical user having the correct role (CUSTOMER_SYS_ADMIN or CUSTOMER_DEVELOPER)

 


Read more...

Environment

SAP Commerce Cloud in the Public Cloud

Product

SAP Commerce Cloud all versions

Keywords

oauth token, cloud portal api, technical user, ci/cd pipeline, empty response, html response, x-approuter-authorization, bearer token, authorization header, application/json, client secret expiration, token generation, api client, build status, commerce cloud , KBA , CEC-SCC-CLA-BUI , Build Process , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.