How do I get an Access Token?

To get an Access Token, you must make an OAuth2 token call using your application’s Client ID and Secret. You can locate your Client ID and Secret by navigating to the Apps & Credentials tab of your Developer Dashboard and selecting your desired application. Your credentials will be available under API Credentials.

There are a few ways to get a token, here is an example using the Postman app:

  • Set the verb to POST.
  • Enter https://api-m.sandbox.paypal.com/v1/oauth2/token as the request URL.
  • Select the Authorization tab.
  • From the TYPE list, select Basic Auth.
  • In the Username field, enter your client ID.
  • In the Password field, enter your client secret.
  • Select the Body tab.
  • Select the x-www-form-urlencoded option.
  • In the KEY field, enter grant_type.
  • In the VALUE field, enter client_credentials.
  • Click Send.

In the response, you'll receive an access token and the number of seconds the access token is valid for.

Note: The access token authenticates your app when calling PayPal REST APIs. You can call the PayPal OAuth API in any language. For more information and examples on how to get an Access Token, visit Get an Access Token.

See also:

How do I create REST API credentials?
Authentication
Refresh Token?

その他のサポートに関する情報

引き続き閲覧する場合は、Cookieを使用して、お客さまのエクスペリエンスを向上させ、カスタマイズします。パーソナライズされた広告を表示するためにCookieを使用してもよろしいですか? 詳細を確認して、お客さまの Cookieを管理する