Get user credentials

Product/components used and version/fix level:

1016

Detailed explanation of the problem:

get user credentials

Question related to a free trial, or to a production (customer) instance?

production

Hello,

that is the best/cleanest way to get user credentials for doing REST API requests? IS there a way to get it from c8y client?

thx :slight_smile:

greets

Helmut

Hi Helmut,

in case your tenant is still configured for basic auth (see Administration - Cumulocity IoT Guides) there might be ways of getting the user credentials after the user has already been logged in. This is e.g. done here: https://github.com/Cumulocity-IoT/cumulocity-node-red/blob/main/frontend/src/modules/node-red-iframe/node-red-iframe.component.ts#L56-L63

In case your tenant is configured with OAuth the option from above does not work. Then the only way would be to get them during the user login.
For security reasons we would always recommend to use OAuth instead of basic auth.

Regards,
Tristan

thx for your quick answer :slight_smile:

Helmut

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.