cancel
Showing results for 
Search instead for 
Did you mean: 

result api get access token returns 403

Options
Go to solution
qp-96
Contributor
Posted on

i'm using “https://api-m.paypal.com/v1/oauth2/token”  api to get access token

before today it workes fine, but now it keeping return 403  http code

and here is the raw return from request :

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<h1>Error 403 Forbidden</h1>
<p>Forbidden</p>
<h3>Guru Mediation:</h3>
<p>Details: cache-qpg1255-QPG 163072300[Removed. Phone #s not permitted]span></p>
<hr>
<p>Varnish cache server</p>
</body>
</html>

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solved

result api get access token returns 403

Options
Go to solution
qp-96
Contributor

thanks for you reply, I have solved this problem.

Seems I refresh  token every 5 minutes is too frequently , so I changed it to refresh token 5 minutes before the token expires.

everything works fine for now 

View solution in original post

2 REPLIES 2

result api get access token returns 403

Options
Go to solution
MTS-Aaron
PayPal Employee

Hi @qp-96 

 

You can use our "Apex tool" here to test out an API call for an access token. Be sure that your call mirrors what the Apex Tool is doing. If there is an issue with your call, there may be a firewall or issue with your server that could be blocking the request. Keep in mind, the Apex Tool is for Sandbox calls and not live calls.

 

I hope that helps!

-Aaron

Solved

result api get access token returns 403

Options
Go to solution
qp-96
Contributor

thanks for you reply, I have solved this problem.

Seems I refresh  token every 5 minutes is too frequently , so I changed it to refresh token 5 minutes before the token expires.

everything works fine for now 

View solution in original post

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.