SAP Knowledge Base Article - Public

3533855 - Error logging in to Datasphere via CLI : "Invalid URL"

Symptom

Getting "Invalid URL" error when logging in to Datasphere via CLI.

Environment

  • SAP Datasphere

Reproducing the Issue

In BAS, login to Datasphere using command :

> datasphere login --secrets-file secrets.json 

Cause

To log in, the CLI requires a temporary code, which it retrieves from the browser.

Resolution

To resolve the issue, the following steps need to be followed:

1. Install Postman in BAS.

2. Use Postman to make a GET request to the target URL in order retrieve the temporary code.

3. Use the code to retrieve the actual tokens by making a POST request to the Token URL with the appropriate parameters such as client_id, client_secret, grant_type, and code.

4. After successfully retrieving the access and refresh tokens, use them in your CLI commands or in in order to consume SAP Datasphere APIs.

See Also

Log into the Command Line Interface via an OAuth Client

https://www.npmjs.com/package/@sap/datasphere-cli

FAQ and Troubleshooting Guide for @sap/datasphere-cli

Keywords

"invalid URL", CLI, token, access, BAS, postman, client , KBA , DS-API-CLI , SAP Datasphere Command-Line Interface , Problem

Product

SAP Datasphere 1.0