En tant que développeur d'applications, vous devez inclure un jeton d'accès dans toute requête adressée à Apigee pour une ressource protégée (une API protégée avec une règle VerifyAccessToken). Notez que les jetons d'accès sont également appelés jetons de support.
Envoyer un jeton d'accès dans une requête
Lorsque vous placez une règle VerifyAccessToken au début du flux de proxy d'API, les applications doivent présenter un jeton d'accès vérifiable (également appelé jeton de support) pour utiliser votre API. Pour ce faire, l'application envoie le jeton d'accès dans la requête en tant qu'en-tête HTTP "Authorization".
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eThis content applies to both Apigee and Apigee hybrid platforms.\u003c/p\u003e\n"],["\u003cp\u003eApp developers must include an access token, also referred to as a bearer token, in requests to access protected resources on Apigee.\u003c/p\u003e\n"],["\u003cp\u003eThe access token is sent in the request as an Authorization HTTP header.\u003c/p\u003e\n"],["\u003cp\u003eApigee verifies the validity of the presented access token before granting API access and returning a response.\u003c/p\u003e\n"]]],[],null,["# Sending an access token\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nAs an app developer, you need to include an access token in any request to Apigee for a\nprotected resource (an API that is protected with a VerifyAccessToken policy). Note that access\ntokens are also called *bearer tokens*.\n\nSending an access token in a request\n------------------------------------\n\nWhen you put a VerifyAccessToken policy at the front of your API proxy flow, apps must present\na verifiable **access token** (also called a *bearer token* ) to consume\nyour API. To do this, the app sends the access token in the request as\nan **Authorization HTTP header**.\n\nFor example: \n\n```\n$ curl -H \"Authorization: Bearer ylSkZIjbdWybfs4fUQe9BqP0LH5Z\" http://{org_name}-test.apigee.net/weather/forecastrss?w=12797282\n```\n\nApigee will verify that the access token presented is valid, and then grant access to the\nAPI, returning the response to the app that made the request.\n\nRelated information\n-------------------\n\nFor information on obtaining an access token, see [Get OAuth 2.0 tokens](/apigee/docs/api-platform/security/oauth/access-tokens).\n\nFor information on verifying access tokens, see [Verifying access tokens](/apigee/docs/api-platform/security/oauth/using-access-tokens)."]]