Cannot connect to a SAP Cloud Platform OData service
See original GitHub issueHello,
First of all, I want to mention that I am aware of the following code:
SERVICE_URL = 'https://odata.example.com/Secret.svc'
session = requests.Session()
session.auth = ('MyUser', 'MyPassword')
theservice = pyodata.Client(SERVICE_URL, session)
However, I have created an ABAP service following this guide (more specifically, the service is created in step 3, Define and Expose a CDS-Based Travel Data Model). And, I got a service with the following structure:
<some_id>.abap-web.us10.hana.ondemand.com/sap/opu/odata/sap/<service_name>/
Here’s also the exact link if that’s necessary.
I cannot find any way to connect with it through PyOData. I imagine this is because SAP Cloud Platform uses OAuth2, while the example code above - HTTP Basic Auth. Still, I tried to input user and password data just to try, but that didn’t work. I also managed to get an authorization token (from an xssec security context), which I think it might help, but can’t see how to pass it properly.
Are there any suggestions for connecting to this service?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
@s7oev Lets leave this open. I have to make sure PyOData works with ABAP RESTful Programming Model.
solved by f7274f8505cccc9bbfc1877d68d550c68949a6c0