that is my first try with an API, said API being called OPS. I would like to get information using the API (OAuth 2) within my python code.
The ressource URL is : http://ops.epo.org/3.2/rest-services/register/{publication}/{EPODOC}/{EP2814089}/biblio
I also received :
Consumer Key: O220VlTQqAmodifiedsf0YeqgM6c
Consumer Secret Key: swWmodified3edjORU
The documentation states that:
OPS uses the OAuth framework for Authentication and Authorization. At this point in time, only the “Client Credentials” flow is supported using a Consumer key and Consumer secret.
The actual steps to follow are:
Step 1: Client converts Consumer key and Consumer secret to Base64Encode(Consumer key:Consumer secret). This should be done programmatically using the language you are developing the client application in. For the purposes of this example, a public website was used to perform this conversion. By entering the colon separated Client credentials, an encoded response is generated. This response is then be used for basic Authentication.
Step 2: Client requests an access token using Basic Authentication, supplying its Consumer key and Consumer secret with base64Encoding over encrypted HTTPS connection:
OPS authenticates the client credentials passed in the Authorization header using basic authentication method. If credentials are valid, OPS responds with a valid access token.
Step 3: Client accesses OPS resources with access token in authorization header (bearer tokens) over encrypted HTTPS connection
I tried a few samples of code with requests but, until now, nothing worked.

