Authentication
Before you can work with external systems, you need to allow SAP Cloud Integration to communicate with SAP Commerce.
- have OAuth client
- be part of integrationadmingroup
OAuth Client
To use web services in SAP Commerce, you need OAuth client. For example, OAuth client is necessary before you can call policy relevance check service. You can define OAuth client through Backoffice or by storing it inside an ImpEx file.
INSERT_UPDATE OAuthClientDetails; clientId[unique = true]; resourceIds; scope; authorizedGrantTypes; authorities; clientSecret; registeredRedirectUri ; financial_trusted ; hybris ; extended ; client_credentials ; ROLE_TRUSTED_CLIENT ; secret ;
Once you have the OAuth client defined, you would need to obtain OAuth token before executing any web service call.
How to obtain an OAuth token?
https://financialservices.local:9002/authorizationserver/oauth/token
|
Key |
Value |
|---|---|
|
client_id |
financial_trusted |
|
client_secret |
secret |
|
grant_type |
client_credentials |
Token will be provided as part of the response and further on, it can be used for accessing APIs.
Integration Group
|
Integrationgroup: |
integrationadmingroup |
|
Username: |
fsintegrationadmin |
|
Password: |
123456 |
Note that you have to be part of integrationadmingroup in order to access either GET request for metadata or import some integration object via POST request. If you do not belong to this group, you should get 403 error.