# GetAccessToken API Operation (/api/nvp-soap/get-access-token)



> **Note:** **Important:** The Adaptive Platform API is not available for new integrations. PayPal provides this documentation to support existing integrations. If you're starting an integration, [we recommend our latest solutions](/).

Gets an access token for a set of permissions.

## GetAccessTokenRequest Message [#getaccesstokenrequest-message]

<img src="https://www.paypalobjects.com/webstatic/en_US/developer/docs/api/GetAccessTokenRequest.gif" />

### GetAccessTokenRequest Fields [#getaccesstokenrequest-fields]

| Field<br />             | Description<br />                                                                                                                                                 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token`<br />           | `xs:string`<br /&#x3E; &#x2A;(Required)* The request token from the response to RequestPermissions.<br />                                                         |
| `verifier`<br />        | `xs:string`<br /&#x3E; &#x2A;(Required)* The verification code returned in the redirect from PayPal to the return URL.<br />                                      |
| `subjectAlias`<br />    | `xs:string`<br /> Do not use.<br />                                                                                                                               |
| `requestEnvelope`<br /> | `common:requestEnvelope`<br /&#x3E; &#x2A;(Required)* Information common to each API operation, such as the language in which an error message is returned.<br /> |

### RequestEnvelope Fields [#requestenvelope-fields]

| Field<br />           | Description<br />                                                                                                                                                                                                       |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `detailLevel`<br />   | `common:DetailLevelCode`<br /&#x3E; &#x2A;(Optional)* Level of detail required by the client application for components. Value is:<br /> `ReturnAll` — This value provides the maximum level of detail (default).<br /> |
| `errorLanguage`<br /> | `xs:string`<br /&#x3E; &#x2A;(Required)* RFC 3066 language in which error messages are returned; by default it is `en_US`, which is the only language currently supported.<br />                                        |

## GetAccessToken Response Message [#getaccesstoken-response-message]

<img src="https://www.paypalobjects.com/webstatic/en_US/developer/docs/api/GetAccessTokenResponse.gif" />

### GetAccessTokenResponse Fields [#getaccesstokenresponse-fields]

| Field<br />              | Description<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `scope`<br />            | `xs:string`<br /> The group IDs of the permission categories associated with the access token:<br /> <br />`EXPRESS_CHECKOUT` — Express Checkout<br />`DIRECT_PAYMENT` — Direct payment by debit or credit card<br />`SETTLEMENT_CONSOLIDATION` — Settlement consolidation<br />`SETTLEMENT_REPORTING` — Settlement reporting<br />`AUTH_CAPTURE` — Payment authorization and capture<br />`MOBILE_CHECKOUT` — Mobile checkout<br />`BILLING_AGREEMENT` — Billing agreements<br />`REFERENCE_TRANSACTION` — Reference transactions<br />`AIR_TRAVEL` — Express Checkout for UTAP<br />`MASS_PAY` — Mass pay<br />`TRANSACTION_DETAILS` — Transaction details<br />`TRANSACTION_SEARCH` — Transaction search<br />`RECURRING_PAYMENTS` — Recurring payments<br />`ACCOUNT_BALANCE` — Account balance<br />`ENCRYPTED_WEBSITE_PAYMENTS` — Encrypted website payments<br />`REFUND` — Refunds<br />`NON_REFERENCED_CREDIT` — Non—referenced credit<br />`BUTTON_MANAGER` — Button Manager<br />`MANAGE_PENDING_TRANSACTION_STATUS` includes ManagePendingTransactionStatus<br />`RECURRING_PAYMENT_REPORT` — Reporting for recurring payments<br />`EXTENDED_PRO_PROCESSING_REPORT` — Extended Pro processing<br />`EXCEPTION_PROCESSING_REPORT` — Exception processing<br />`ACCOUNT_MANAGEMENT_PERMISSION` — Account Management Permission (MAM)<br />`ACCESS_BASIC_PERSONAL_DATA` — User attributes<br />`ACCESS_ADVANCED_PERSONAL_DATA` — User attributes<br />`INVOICING` — Invoicing<br /> |
| `token`<br />            | `xs:string`<br /> The access token that identifies a set of permissions.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `tokenSecret`<br />      | `xs:string`<br /> The secret associated with the access token.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `responseEnvelope`<br /> | `common:ResponseEnvelope`<br /> Common response information, including a timestamp and the response acknowledgment status.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### ResponseEnvelope Fields [#responseenvelope-fields]

| Field<br />           | Description<br />                                                                                                                                                                                                                                                                                                                                                     |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ack`<br />           | `common:AckCode`<br /> Acknowledgment code. Value is:<br /> `Success` — The operation completed successfully.<br />`Failure` — The operation failed.<br />`Warning` — Warning.<br />`SuccessWithWarning` — The operation completed successfully; however, there is a warning message.<br />`FailureWithWarning ` — The operation failed with a warning message.<br /> |
| `build`<br />         | Build number; it is used only by Merchant Technical Support.<br />                                                                                                                                                                                                                                                                                                    |
| `correlationId`<br /> | Correlation ID; it is used only by Merchant Technical Support.<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.                                                                                                                       |
| `timestamp`<br />     | Date on which the response was sent. The time is currently not supported.<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.                                                                                                            |

## PPFault Message [#ppfault-message]

The `PPFaultMessage` returns `ErrorData` and the `ResponseEnvelope` information to your application if an error occurs.

<img src="https://www.paypalobjects.com/webstatic/en_US/developer/docs/api/FaultMessage.gif" />

<img src="https://www.paypalobjects.com/webstatic/en_US/developer/docs/api/ErrorData.gif" />

### FaultMessage Fields [#faultmessage-fields]

| Field<br />              | Description<br />                                                                                                                |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `error`<br />            | `common:ErrorData`<br /> Detailed error information.<br />                                                                       |
| `responseEnvelope`<br /> | `common:ResponseEnvelope`<br /> Common response information, including a timestamp and the response acknowledgment status.<br /> |

### ErrorData Fields [#errordata-fields]

| Field<br />         | Description<br />                                                                                                                                                                                                                                                       |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `category`<br />    | `common:ErrorCategory`<br /> The location where the error occurred.<br /> Value is:<br /> <br />`System` — The system encountered errors; try again<br />`Application` — The application encountered errors; try again<br />`Request` — The request was incorrect<br /> |
| `domain`<br />      | The domain to which this service belongs.<br />                                                                                                                                                                                                                         |
| `errorId`<br />     | A number that uniquely identifies a particular error.<br />                                                                                                                                                                                                             |
| `exceptionID`<br /> | This field is not used.<br />                                                                                                                                                                                                                                           |
| `message`<br />     | A description of the error.<br />                                                                                                                                                                                                                                       |
| `parameter`<br />   | `common:ErrorParameter`<br /> Represents contextual information about the error.<br />                                                                                                                                                                                  |
| `severity`<br />    | `common:ErrorSeverity`<br /> The severity of the error encountered.<br /> Value is:<br /> `Error` — Processing of the request was interrupted<br />`Warning` — Processing of the request was completed<br />                                                            |
| `subdomain`<br />   | This field is not used.<br />                                                                                                                                                                                                                                           |

### ResponseEnvelope Fields [#responseenvelope-fields-1]

| Field<br />           | Description<br />                                                                                                                                                                                                                                                                                                                                                     |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ack`<br />           | `common:AckCode`<br /> Acknowledgment code. Value is:<br /> `Success` — The operation completed successfully.<br />`Failure` — The operation failed.<br />`Warning` — Warning.<br />`SuccessWithWarning` — The operation completed successfully; however, there is a warning message.<br />`FailureWithWarning ` — The operation failed with a warning message.<br /> |
| `build`<br />         | Build number; it is used only by Merchant Technical Support.<br />                                                                                                                                                                                                                                                                                                    |
| `correlationId`<br /> | Correlation ID; it is used only by Merchant Technical Support.<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.                                                                                                                       |
| `timestamp`<br />     | Date on which the response was sent. The time is currently not supported.<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.                                                                                                            |

### GetAccessToken Errors [#getaccesstoken-errors]

| Code<br />   | Message<br />                                | Additional Information<br /> |
| ------------ | -------------------------------------------- | ---------------------------- |
| 579058<br /> | Request token is Expired<br />               |                              |
| 580022<br /> | Invalid Request token or Verifier Code<br /> |                              |
