Skip to content

OAuth failing because oauth_token is not encoded. #1495

Closed
@sharok

Description

@sharok

Expected Behavior

OAuth authenticator should get access token.

Actual Behavior

Using OAuth1Authenticator.ForAccessToken I get an error from the provider that oauth_token is absent. But it exists in the header.
After debugging the source code, I figured out that RestSharp doesn't encode oauth_token.

After changing the line in OAuthWorkflow file:
if (!Token.IsEmpty()) authParameters.Add(new WebPair("oauth_token", Token));

to

if (!Token.IsEmpty()) authParameters.Add(new WebPair("oauth_token", Token, true));

I was managed to get access token.

PS. I use ETrade exchange broker in this case.

Specifications

  • Version: 106.11.4 ( also tried 106.11.5-alpha.0.21)
  • Platform: .NET Core 3.1
  • Subsystem: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions