cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to call Auth token API for authenticating CCO transactions

silambarasan_RS
Active Contributor
0 Likes
694

Hi expert,

This is regarding CCO and ECC integration, we struck in bulk insert article in CCO Manager.

POST Method:

/auth/token Endpoint to authenticate to the server via an app token.

I am getting error while running the API

Unautheticated with error code 901

Request body:

{ "id": "Admin", "appToken": "49bef212-19c2-43b4-ab23-c2d782d5079d" }

id: User id for login

appToken:taken from /auth/admin api.

Response we are getting

{"errorCode":"901","errorMessage":"Unauthenticated"}

Please help us resolve.

regards,

yadav

Accepted Solutions (1)

Accepted Solutions (1)

gunther_sandtner
Product and Topic Expert
Product and Topic Expert

Hello Yadav,

Follow these steps for authentication in the Swagger UI:

  1. In a Web browser, enter the following URL: <server name>:<port>/ccos/api-documentation (if you used ccos as the .war file name)
  2. This should open the Swagger UI SAP Customer Checkout manager API
  3. Hit POST /auth/admin (Authentication endpoint for CCOm users for login) to expand this call
  4. Hit the Try it out button
  5. The authentication parameters field is now editable with this content:
    {
    "lowLevel": false,
    "userName": "string",
    "secret": "string"
    }
  6. In line userName replace "string" with a CCOm admin user name
  7. In line secret replace "string" with the CCOm admin user password
  8. Hit the Execute button
  9. Scroll down below the execute button
  10. You should have received a server response code 200
  11. In the Response body field you will find a line beginning with "csrfToken"
  12. Copy this unique token key
  13. Scroll up to the top of the page and hit the Authorize button
  14. Paste the key in CsrfTokenAuth (apiKey)
  15. Hit the Authorize button

Now you are authorized to send requests to the CCO manager application. You can proceed to send your bulk materials insert call.

Best regards,

Gunther

Answers (0)