I had successfully integrated dwolla into my application. Now I am getting a 401 error connecting to the API. I have always used the following code to generate a token and never had an issue
$client_id = $key; $client_secret = $secret; $basic_credentials = base64_encode($client_id.':'.$client_secret); $ch = curl_init('https://sandbox.dwolla.com/oauth/v2/token'); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Basic '.$basic_credentials, 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8')); curl_setopt($ch, CURLOPT_POSTFIELDS, 'grant_type=client_credentials'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = json_decode(curl_exec($ch)); var_dump($data); $token = $data->access_token; curl_close($ch);
Has something changed on Dwolla’s side?