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
Create an API that requires a token. You can use it to connect to Google Sheets from Python.
from flask import Flask, request,jsonify
import requests
if response.status_code == 200:
data = response.json()
return jsonify(data), 200
else:
return jsonify({"error": "Error en la solicitud a Google Sheets API"}), response.status_code
if name == 'main':
app.run()
2. Configure the Authenticate API now as shown in the image.
![image](https://github.com/appsmithorg/appsmith/assets/114161539/eb46ef99-4b88-4570-b5f5-6ae47d1efdf1)
3. Execute the API, and you will see the error.
### Public Sample App
_No response_
### Environment
Production
### Issue video log
_No response_
### Version
Self-Hosted 1.9.27
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.
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()