result api get access token returns 403

qp-96
Contributor
Contributor

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>

 

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

qp-96
Contributor
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

Login to Me Too
3 REPLIES 3

MTS-Aaron
PayPal Employee
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

Login to Me Too
Solved

qp-96
Contributor
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 

Login to Me Too

Bongratha168
Contributor
Contributor
qp-96: C2
Login to Me Too

Haven't Found your Answer?

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