When you call an API proxy on Apigee that has OAuth security, Apigee is responsible for
verifying access tokens. Think of Apigee as the gatekeeper -- no API call can pass through that
does not have an access token that can be verified.
Adding a VerifyAccessToken policy
To configure token verification, place an OAuthV2 policy with the
VerifyAccessToken operation at the very beginning of the API proxy flow (the
beginning of the ProxyEndpoint Preflow). If placed there, access tokens will be verified before
any other processing takes place, and if a token is rejected, Apigee stops processing and returns
an error back to the client.
To access the API proxies page using the Apigee UI:
Select Develop > API Proxies in the left navigation bar.
From the list, select the proxy you wish to protect.
In the overview page, click the Develop tab.
In the Navigator, select PreFlow for an endpoint listed under Proxy
Endpoints. Typically, the endpoint you want is called "default", although it is possible to
create multiple proxy endpoints. If you do have multiple endpoints, you will probably want to
follow these steps to perform token verification on each one.
In the proxy flow editor, click + Step.
Select Policy Instance New.
From the policy list, select OAuth v2.0.
Optionally, change the policy name and display name. For example, for better readability,
you might change the display name and name both to "VerifyAccessToken".
Click Add.
The default policy is already configured with the VerifyAccessToken operation, so you do not
have to do anything further:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-10 UTC."],[[["This content focuses on configuring OAuth 2.0 access token verification within Apigee and Apigee hybrid API proxies."],["Apigee acts as a gatekeeper, requiring and verifying access tokens for all API calls to ensure security."],["To verify access tokens, an OAuthV2 policy with the VerifyAccessToken operation must be placed at the beginning of the API proxy's flow, specifically the ProxyEndpoint Preflow."],["The default setting for the VerifyAccessToken policy expects the access token to be included in the Authorization header as a Bearer token, but it can be configured to support different types of tokens."],["If encountering an \"Invalid API call as no apiproduct match found\" error, an external community article is provided for troubleshooting steps."]]],[]]