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

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

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.

Keywords

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

Product

SAP Datasphere all versions