so is the existing Web Source Module also not working any more - or are you just not able to create a new one? Please clarify ...
HTTP 401 comes from the REST server and this indicates that something is wrong with the credentials. Note that APEX reuses the OAuth Access Token. So if you invoke the first REST API, an Access Token is requested - and APEX will reuse that as long as it’s valid - for all Web Source Modules which are using this very Web Credential. If your second REST API requires another Access Token, you need a new Web Credentials instance. Also: is the required “scope” for both API endpoints really the same?
So you might try with using an own Web Credentials instance for each Web Source Module, but this is just a shot into the blue. Without more information (or a test case) it is hard to provide more input ...
Thank for the update. I think you are suggesting to create another client id and secret which i was also thinking. I will try to create new web credential here in APEX. I will check this if it works. The scope is same i think it was success earlier. Even from POSTMAN I am using the same. I don't think it is making any problem. Problem may be with web credential. I will create new web credential with new client id and secret.
Thank again for your suggestion.
Hi Carsten ,
I think existing still working. But its not allowing me to create new web source module. Even I have created new client id and secret but still fail.
I tried with new credential but keep on failing in APEX. Getting error Unauthorised 401. Even with same new credential is working very fine with POSTMAN where I am getting token and able to get the API payload response. This is something I am not understanding.
I am using this scope : https://graph.microsoft.com/.default which is same in POSTMAN API CALL.
Please help me if you can give me an idea.
I'm afraid I won't be able to help without concrete details on the REST API or a test case ...
Can you share a sequence of "curl" commands (instead of Postman) you're using in order to access the REST API? I would need to see all parameters you're using to access the REST API and the Web Source Module definition. In Postman this is distributed across several windows - a "curl" command line contains it all in one line.
Hi Cartsen ,
I have tried with other approach. I am sure there is some issue with Web Source Modules. Still working with the same but now I am doing JSON payload and authenticating at same time. I can say authentication issue is fixed. Now issue with JSON array parsing in APEX. I am not able to get the data for below payload columns.
As per my understanding square bracket means JSON array. It is failing in APEX web source modules. I have planned other approach but didnt success. How to make this array into single value attribute, i mean is there any way to change array to string.
If i can pass payload as "Country" : "Burkina,Rwanda,Liberia" i think it will treat it as string and my issue may be fix.
Hope I will get some update from you.
Hi Carsten ,
How to lodge this issue with APEX Product Development team. I think this is APEX issue. Whenever I am trying to access JSON array data ,it is always failing and saying this error. Payload is correct even i have tested payload in https://jsonlint.com/ JSON validate. I am agetting this error as follow:
Different questions should be posted in a different thread.
You can contact Oracle APEX Product Support through My Oracle Support. A valid Support contract for your Oracle Database is required. (This Support contract includes ORDS, APEX, and (I believe) SQL*Developer )
PS - if your string does not pass the IS JSON test, then it will probably fail an APEX test.
Thanks for the update. Sure I will take care next time for posting each individual question in separate thread.
I am trying it in APEX public so don't have valid DB license for it. As i can see payload is same what i got it from POSTMAN and even I am getting success but whenever it is finding JSON list places with in square bracket it is failing.
If I will remove these columns all data is coming perfect and displaying correctly. Issue with APEX parsing for JSON array what i have understood as of now. It would good if you can help out here.
If i will remove these columns from Payload i am getting success result as shown below.
Please try to help me as I am presenting demo to customer but it is not giving me exact what I am expecting as I have suggested the APEX for number of clients.