Auto generating API keys using our Application Authentication Endpoint

Posted by Paidboom - 6 months ago

Auto generating API keys using our Application Authentication Endpoint API Authentication Endpoint : /wc-auth/v1/authorize Here an example in PHP and soon it will also be available in our REST API docs:

<?php
$store_url = 'http://example.com';
$endpoint  = '/wc-auth/v1/authorize';
$params    = array(
    'app_name'     => 'My App Name',
    'scope'        => 'write',
    'user_id'      => 123,
    'return_url'   => 'http://app.com&#39;,
    'callback_url' => 'https://app.com&#39;
);

echo $store_url . $endpoint . '?' . http_build_query( $params );