Hi I am using a very simple service callout to verify our third-party oAuth token, but I keep getting a timeout error even when I set the timeout.
I am verifying the token with a GET request like this: https://{external_URL}/oauth/token/user?=access_token={oAuthtoken}
On the music example: https://github.com/dzuluaga/apigee-tutorials/tree/master/apiproxies/musicapi-oauth-delegated-authentication from the http://docs.apigee.com/api-services/content/use-third-party-oauth-system, it seems that it’s passed in as a header parameter instead of query.
Am I not verifying the token correctly in apigee when I pass it in as a query param with GET verb?
Error I am getting:
{ “fault”: { “faultstring”: “Execution of ServiceCallout OAuthVerifyCall failed. Reason: timeout occurred in OAuthVerifyCall”, “detail”: { “errorcode”: “steps.servicecallout.ExecutionFailed” } } }
ServiceCallout policy:
false
OAuthVerifyResponse
3600000
1xx,2xx,3xx,4xx
https://{external_URL}/oauth/token/user
Assign Message policy:
{oauthtoken}
GET
@Barbara: Are you getting timeout in Apigee only? have you checked that third-party OAuth API not giving any time time out in Postman or SoapUI…?
1 Like
Hi Sachhida, I ran the apigee proxy immediately after I generated an access token. Then, I validated my apigee token with the GET request that I mentioned before on Postman, and the token is still valid.
Actually I checked and you might be right that there may be a network issue with apigee and the external oAuth verification. While we fix that, do you mind letting me know if the way I am using service callout in the correct way to verify an access token with a GET method?
@Barbara: the resource you created and service call out, are they both GET?
don’t set access_token in other assign message policy. set in the service call out request.
for you reference service call out policy:
false {{oauthtoken} application/json GET OAuthVerifyResponse 3600000 1xx,2xx,3xx,4xx https://{external_URL}/oauth/token/user
Thank you! I will change that policy and try to resolve the network error as well. Yes the resource I created and the service call out are both GET.