Skip to main content

CLIENT_ID and CLIENT_SECRET error

  • 26 April 2024
  • 0 replies
  • 1 view

I am trying to configure CLIENT_ID and CLIENT_SECRET as indicated in the tutorial


In my dashboard I configured a new OAuth (ID: db24bd9f-94ea-45d1-9a1b-0f91b73d4b4b), however when I type in the cell this data, and executed

(img = request.get_data()[0]) ) gives me this error:


ValueError: The configuration parameters ‘sh_client_id’ and ‘sh_client_secret’ must be set to authenticate with the Sentinel Hub service


I have written the parameters correctly in the following script in the documentation and if you allow me to connect, but as I mentioned before, in the tutorial code cell it generates an error.


from oauthlib.oauth2 import BackendApplicationClient

de requests_oauthlib import OAuth2Session


client_id = 'db24bd9f-94ea-45d1-9a1b-0f91b73d4b4b

client_secret = 'mytoken


client = BackendApplicationClient(client_id=client_id)

oauth = OAuth2Session(client=client)


token = oauth.fetch_token(token_url=‘https://services.sentinel-hub.com/oauth/token’,

client_id=client_id, client_secret=client_secret)


All requests using this session will have an access token automatically added

resp = oauth.get(“https://services.sentinel-hub.com/oauth/tokeninfo”)

print(resp.content)

0 replies

Be the first to reply!

Reply