PayPal Permissions Service May 2012 19
Using the Permissions Service
Obtaining Permissions
2
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: api_username"
-H "X-PAYPAL-SECURITY-PASSWORD: api_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: app_id"
https://svcs.sandbox.paypal.com/Permissions/RequestPermissions -d
"requestEnvelope.errorLanguage=en_US
&scope=EXPRESS_CHECKOUT
&callback=http://your_return_url"
PayPal responds with a request token that you use in following steps to obtain an access
token.
NOTE: The request token from this step is different than the access token, which you use
to access permissions that already have been granted.
2. Redirect the account holder’s browser to PayPal and include the request token in the
request_token parameter.
https://www.paypal.com/cgi-bin/webscr?
cmd=_grant-permission&request_token=token
PayPal initiates granting permissions. When the account holder grants permissions, PayPal
returns a verification code, which you use in the next step.
NOTE: The verification code expires in about 15 minutes.
3. Set up your request and call the GetAccessToken API operation.
– Specify the request token in the token field.
– Specify the verification code in the verifier field.
– Send the request to
https://svcs.paypal.com/Permissions/GetAccessToken.
Comments to this Manuals