A little help with the mine field of API

I have a supplier who has changed their API and its lets say confusing me some what.

for authorisation I have the following:

$client = new \GuzzleHttp\Client();
$response = $client->post(
https://api.supplier.com.au/api/v1/oauth/token’,
[
‘headers’ => [
‘Content-Type’ => ‘application/json’,
‘Accept’ => ‘application/json’,
‘Authorization’ => ‘Bearer {token}’,
‘Api-Version’ => ‘v1’,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

How on earth do I put this into Wappler ?
Any suggestions or walkthroughs would be awesome so I can get a connection

Community Page
Last updated: