Error "401-Unauthorized" in REST call

We’re having a problem calling REST services on our tenant.
We built the URL for fetching out type following the instructions (https://host/api/1/tenant/tag/typeName?action=fetch) and using Basic Auth to add the Authorization token to our request header.
Unfortunately this was not sufficient, we always get the error “401-Unauthorized”.
The only way to avoid this error was adding to the Cookie the value “c3auth=tokenValue”, copied from a fetch call done in the tag console.
Is this behaviour correct? If so, which is the correct way to get the c3auth value for the cookie?

Thank you

the c3 environment you are working on requires Single Sign On-based authentication. Basic authentication is not authorized.

If you want to consume C3 types from an external application, you will need to create a username for that application or use oauth-based authentication. Reach out to your administrator to find what fits better your use case.

You can find more information about this in the User Authentication section of the documentation (Open Console->Help->Documentation).

If the environment is configured to for single sign-on, there are two options for REST API authentication:

  1. Basic authentication. This requires a basic auth user (not a SSO user) with appropriate permissions be defined in the application tenant/tag.
  2. General an OAuth token for a given user (i.e. SSO user) and use the OAuth token for authentication. The OAuth token will have permissions of the user the token was created for.

The recommendation, as recommended by @santiago.lopez is to use OAuth.