Skip to content

Etsy API doesn't return parameter.codeVerifier_ ? #448

Open
@MOhhh-ok

Description

@MOhhh-ok

Hi.

Etsy seems to be not return codeVerifire_ parameter.

The error is "Error retrieving token: invalid_request, code_verifier is required"

So, I tried below code, then it works.

    function EtsyAuthCallback(request: { [key: string]: any }) {
        const oauth = new EtsyOAuth(); // Wrapper class
        const service = oauth.getService();
 
        // ignore the error: Error retrieving token: invalid_request, code_verifier is required
        request.parameter.codeVerifier_ = PropertiesService.getUserProperties().getProperty('code_verifier');

        const isAuthorized = service.handleCallback(request);
        if (isAuthorized) {
            return HtmlService.createHtmlOutput('Success! You can close this tab.');
        } else {
            return HtmlService.createHtmlOutput('Denied. You can close this tab');
        }
    }

Is this an issue, or my mistake?
Thanks.

Metadata

Metadata

Assignees

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