Whenever I click the Connect with OAuth button I get an error message of the following:
Retool
Encountered an error (500):
{
"error": "{\"statusCode\":400,\"data\":\"{\\\"error\\\":\\\"invalid_request\\\",\\\"error_description\\\":\\\"request is missing a required parameter or malformed.\\\"}\"}",
"request": {
"url": "api.ebay.com/identity/v1/oauth2/token",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Host": "api.ebay.com",
"User-Agent": "Node-oauth",
"Content-Length": 330
},
"body": {
"grant_type": "authorization_code",
"redirect_uri": "https://oauth.retool.com/oauth/user/oauthcallback",
"client_id": "I've taken this out but this has my client ID in it",
"client_secret": "---sanitized---",
"code": "---sanitized---"
}
}
}
or try to mock up a POST request in something external like Postman, grab the code string, and run it through a URL decoder to see if it still has percent encodings in it after decoding? just spitballing here, tbh I am bad/inexperienced with OAuth
You have to go to your Retool settings, then Beta and tick Include Authorization header for OAuth requests and then set up a Custom Auth in Retool and select OAuth 2.0 Generic and enter the standard details in for eBay as the first step then add two more steps to your Custom Auth in Retool, one for each defined variable, I named mine ACCESS_TOKEN with value = {{oauth1.accessToken}} and the other REFRESH_TOKEN and pass in {{oauth1.refreshToken}}.