Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get access token and secret? #60

Open
png-prakash opened this issue Feb 3, 2021 · 0 comments
Open

How to get access token and secret? #60

png-prakash opened this issue Feb 3, 2021 · 0 comments

Comments

@png-prakash
Copy link

Hi,
Install this package in Laravel

public function connect(Request $request)
{
    $callbackUrl = env('APP_URL') . '/etsy/callback';
    $client = new Etsy\EtsyClient(env('ETSY_CONSUMER_KEY'), env('ETSY_CONSUMER_SECRET'));
    $helper = new Etsy\OAuthHelper($client);

    $authorizationUrl = $client->getRequestToken(
        array(
            'callback' => $callbackUrl,
            'scope' => 'transactions_r'
        )
    );

    return redirect($authorizationUrl['login_url']);
}

After connection in callback url I got like this

http://127.0.0.1:8000/etsy/callback?oauth_token=ea1d.....21&oauth_verifier=4c....5c9#_=_

In callback function, I don't know how to get access token and secret

public function callback(Request $request)
{
$client = new Etsy\OAuthHelper(env('ETSY_CONSUMER_KEY'), env('ETSY_CONSUMER_SECRET'));
}
In your document I don't see how to get access token
What is the next step?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant