Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in

Le Forum de la communauté n’est pas disponible pour les nouveaux messages ou les réponses; les articles précédents restent disponibles pour vérification. Afin de connaître les options d’assistance complètes, rendez-vous sur PayPal.com/HelpCenter

Si vous souhaitez signaler du contenu illégal et contraire au Règlement sur les services numériques de l’Union Européenne (DSA), veuillez cliquer ici.

since ‎Jan-06-2019
Country: Netherlands
Type: Business
infodropdepo
infodropdepo Contributor
Contributor
1
Post
0
Kudos
0
Solutions
Your PayPal Anniversary
Organized
Active
The Return
View all
Latest Contributions by infodropdepo
  • Topics infodropdepo has Participated In
  • Latest Contributions by infodropdepo

Paypal bearer token key doesn't work in curl cli

by infodropdepo Contributor in REST APIs
‎Jan-08-2019 10:09 PM
‎Jan-08-2019 10:09 PM
I am integrating paypal with website, so testing sandbox accounts.   curl -v https://api.sandbox.paypal.com/v1/oauth2/token \ -H "Accept: application/json" \ -H "Accept-Language: en_US" \ -u "client_id:secret" \ -d "grant_type=client_credentials"   So I got this response.   {"scope":"https://uri.paypal.com/services/paypalhere https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/payments/refund https://uri.paypal.com/services/applications/webhooks https://uri.paypal.com/services/invoicing https://uri.paypal.com/services/payments/payment/authcapture https://uri.paypal.com/payments/payouts https://api.paypal.com/v1/vault/credit-card/.* https://api.paypal.com/v1/payments/refund https://uri.paypal.com/services/reporting/search/read https://uri.paypal.com/services/identity/activities https://uri.paypal.com/services/disputes/read-seller https://uri.paypal.com/services/subscriptions https://uri.paypal.com/services/disputes/read-buyer https://api.paypal.com/v1/vault/credit-card https://api.paypal.com/v1/payments/sale/.*/refund openid https://uri.paypal.com/services/disputes/update-seller https://uri.paypal.com/services/payments/realtimepayment", "nonce":"2019-01-09T05:22:13ZiZajL9aeg05_piYJJ4Ahq11s0FbUiJarNAnFDoEPZQw", "access_token":"A21AAEfztNgn--7s73LnfG_YnpfR93XQHrB1vOaUJp0tYfhA3J7y_wb8Zj8fMna9SSimQ1Pdhf9bdacR1CmiYNcZn7RS164nA", "token_type":"Bearer", "app_id":"APP-80W284485P519543T", "expires_in":32364} So I tried to get invoice list using this access token like this.   curl -v -X GET https://api.sandbox.paypal.com/v1/invoicing/invoices?page=3&page_size=4&total_count_required=true \ -H "Content-Type: application/json" \ -H "Authorization: Bearer A21AAEfztNgn--7s73LnfG_YnpfR93XQHrB1vOaUJp0tYfhA3J7y_wb8Zj8fMna9SSimQ1Pdhf9bdacR1CmiYNcZn7RS164nA" But it didn't work, only returned authorization error. < HTTP/1.1 401 Unauthorized < Date: Wed, 09 Jan 2019 05:30:32 GMT < Server: Apache < paypal-debug-id: 7aa8ce0862f88 < HTTP_X_PP_AZ_LOCATOR: sandbox.slc < Paypal-Debug-Id: 7aa8ce0862f88 < Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D4169545052%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 09 Jan 2019 06:00:32 GMT; domain=.paypal.com; path=/; Secure; HttpOnly < Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT < Content-Length: 244 < Connection: close < Content-Type: application/json < * Closing connection 0 * TLSv1.2 (OUT), TLS alert, Client hello (1): {"name":"AUTHENTICATION_FAILURE","message":"Authentication failed due to invalid authentication credentials or a missing Authorization header.","links":[{"href":"https://developer.paypal.com/docs/api/overview/#error","rel":"information_link"} I tried several times, but was same all the time ~ Please let me know the reason of this. Thank you.   ... View more
Labels:
  • Labels:
  • Payments REST APIs
Paypal Logo
  • Help
  • Contact Us
  • Security
  • Fees
  • © 1999-2025 PayPal, Inc. All rights reserved.
  • Privacy
  • Legal
  • Cookies
  • Policy Updates

The money in your balance is eligible for pass-through FDIC insurance.

The PayPal Cash Mastercard is issued by The Bancorp Bank pursuant to a license by Mastercard International Incorporated. The Bancorp Bank; Member FDIC.

Powered by Khoros