I use python and using this script:
client_id = 'Hello' # I am using here my real id and client secret as mentioned in the tutorial
client_secret = 'World'
client = BackendApplicationClient(client_id=client_id)
oauth = OAuth2Session(client=client)
token = oauth.fetch_token(
token_url='https://identity.dataspace.copernicus.eu/auth/realms/CDSE/protocol/openid-connect/token',
client_id=client_id,
client_secret=client_secret
)
resp = oauth.get("https://services.sentinel-hub.com/oauth/tokeninfo")
print(resp.content)
def sentinelhub_compliance_hook(response):
response.raise_for_status()
return response
oauth.register_compliance_hook("access_token_response", sentinelhub_compliance_hook)
And I still got this error:
oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client) Invalid client or Invalid client credentials
I checked multiple times that I for sure have the correct id and secret and even recreated it, but still this error.
I am using this version:
oauthlib==3.2.2
requests-oauthlib==1.3.1