Invalid Paypal API Credentials

I am using REST api in a nodejs application. Everything works fine with the sandbox, but when I update the current credentials, I get:

{ [Error: Response Status : 401]
  response:
   { error: 'invalid_client',
     error_description: 'The client credentials are invalid',
     httpStatusCode: 401 },
  httpStatusCode: 401 }

I upgraded my account to buisness but still did not work, I use the current endpoint and Live credentials.

What should I do to make this work?

+4
source share
2 answers

I had the same problem using PayPalSDK / rest-sdk-nodejs and the transfer was solved with the configuration parameters (host, client_id, client_secret, ...) and the parameter . , , "" , , .

+15

matteo, dev , . "" ApiContext-.

PayPals PHP REST-API-SDK . bootstrap.php in/vendor/paypal/rest-api-sdk-php/sample/ 84. api .

<?php

$apiContext = new ApiContext(
    new OAuthTokenCredential(
        $clientId,
        $clientSecret
    )
);

// Comment this line out and uncomment the PP_CONFIG_PATH
// 'define' block if you want to use static file
// based configuration

$apiContext->setConfig(
    array(
        'mode' => 'sandbox',
        'log.LogEnabled' => true,
        'log.FileName' => '../PayPal.log',
        'log.LogLevel' => 'DEBUG', // PLEASE USE `INFO` LEVEL FOR LOGGING IN LIVE ENVIRONMENTS
        'cache.enabled' => true,
        // 'http.CURLOPT_CONNECTTIMEOUT' => 30
        // 'http.headers.PayPal-Partner-Attribution-Id' => '123123123'
        //'log.AdapterFactory' => '\PayPal\Log\DefaultLogFactory' // Factory class implementing \PayPal\Log\PayPalLogFactory
    )
);
0

All Articles