I want to use API from Publons. They mentioned "Any other requests should include a token in the Authorization HTTP header and prefixed with 'Token'.
So, i try to set the Token
in headers. This is my code
$client = new Client([
'base_uri' => "https://publons.com/api/v2/academic/",
'headers' => [
'Token' => "MyToken"
]
]);
The result is {"detail":"Authentication credentials were not provided."}
. I make sure the token is correct, beacause I've try it on Talend API Tester and works. Can anyone help me? Where is the mistake?