I am using below code to call the API but its showing error:
$request = new SoapClient(
'http://magento2-dev.local/index.php/soap/? wsdl&services=foggylineSliderSlideRepositoryV1',
array(
'soap_version' => SOAP_1_2,
'stream_context' => stream_context_create(array(
'http' => array(
'header' => 'Authorization: Bearer pk8h93nq9cevaw55bohkjbp0o7kpl4d3'
)
)
)
)
);
$response = $request->foggylineSliderSlideRepositoryV1GetById(array('slideId' => 1));
var_dump($response);
Best Answer
With this code also u can get access token dynamically and try to integrate it in above code