Open felix-appsmith opened 1 year ago
The workaround is to send the authorization token directly from the header and not as a token from the Authorization. Configure it as shown in the following image.
I have the same issue in Appsmith Free CE. I tried passing <
Should this work in the Appsmith Free CE version?
@alexanoid did you try out the workaround suggested by felix in the comment above? i.e. , send the token as a header param
Is there an existing issue for this?
Description
Currently, when I send the token I obtained after logging in with OAuth to Appsmith and try to use it as a bearer token in an authenticated data source, and then use that token in my API, it fails. This is because Appsmith sends <> to the API instead of sending the actual token.
Steps To Reproduce
app = Flask(name)
@app.route('/GetFiles', methods=['POST']) def get_files(): url = "https://sheets.googleapis.com/v4/spreadsheets/<>"
bearer_token = request.headers.get('Authorization')
print(bearer_token)
headers = {
"Authorization": f"Bearer {bearer_token}"
}
response = requests.get(url, headers=headers)
if name == 'main': app.run()