2024 Aug 27 8:20 AM - edited 2024 Aug 27 8:28 AM
Hi
I started to write this question as I thought I needed the APIKey for a call to this API below. I am still wanting to know that.
I want to update an element via the API_BUSINESS_PARTNER ... I have set up the comms arrangement sap_com_008 with basic authentication for this test.
According to the API Hub an APIKey is needed - that is in fact not true !!!.🙄 As I can call the API without it and it does the PATCH just fine. But out of interest How can I get my SAP systems APIKey?🤔
In case you are interested in this part : Here is the API I am calling https://<my sap system>-api.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('9980000760'). This has in the Authorization tab my communication arrangements userid/password credentials. The Headers have the CSRF token that I have obtained and it does not care about the APIKey. The thing does post/patch just fine without it.
Here are the steps etc I took so far to obtain my APIKey
I have set a clientid/secret for OAUTH calls to S4HC API in our SAP IAS Application for our S4HANA Cloud- Test Tenant (i,e, the S4HC D5X system) and the Client Authentication attribute tab - The ClientID was already there and I have added a Secret.
I then attempt to obtain the APIKey via https://<mysapsystem>-api.s4hana.ondemand.com:443/oauth/token
but I get a 403 - so how can I get my dang APIKey ?
Request clarification before answering.
Thank you and congratulations for answering your own question, @peter_munt4!
Here is what I found on obtaining and managing API keys:
The latter contains some information om OAuth v API Key. They appear to be alternative ways to authenticate:
When you're finding your own answers, please share them by replying to your own post with an answer and mark that answer as resolving your question. This way, the only somewhat smart (AI, yes, there, I said it) algorithms will recognize your answer as such and suggest your response to other community members who might be looking for a clue about the API key. Thank you for being such a good sport, Peter!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for your reply but my question really is about how to obtain my APIKey for my company's S4HC SAP system. Are you saying that the ONLY way to obtain the APIKey is from the SAP API Hub page and hence will be the same for both my DEV/QAS and PROD S4HC SAP system? The API documentation as you can see here has it as a required Header - let's assume that really is true - so wondering how to obtain it or is that just a requirement when executing it just from this particular page ?
User | Count |
---|---|
87 | |
12 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.