Search in documentation
ctrl+4K
Modules
Authentication
Merchant
Catalog
Order
Events
Logistics
Shipping
Review
Financial
Solutions

Flow for centralized applications

Use this flow when the application:
  • Operates in internal/private environments
  • Is not directly accessible from the internet
  • Can securely store the secret key on the server
Example: Servers in private VPC consuming iFood APIs to expose their own services.
Tokens cannot exceed 8,000 characters. Ensure your integration provides adequate storage for these tokens.
  1. Find your credentials
  • Open the Developer Portal
  • Go to My Apps > Application credentialsYou will see:
  • _clientId_: unique identifier of the application
  • _clientSecret_: key to obtain access tokens. Store securely and never expose.
  1. Request the access tokenUse the clientId and clientSecret from your application to request an access token through the Authentication API.
  2. Use the received tokenThe API returns the access token needed to consume iFood APIs.
    Centralized applications do not receive refresh tokens. Check the FAQ for details.
  3. Access the resourcesInclude the token in requests to iFood APIs using Bearer-type HTTP authentication.

POST /oauth/token

DescriptionRequests a new access token to access API resources. By default, the token expires in 6 hours. For centralized applications, use the grant type client_credentials.cURL example
curl -X POST "https://merchant-api.ifood.com.br/authentication/v1.0/oauth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grantType=client_credentials&clientId=YOUR_CLIENT_ID&clientSecret=YOUR_CLIENT_SECRET"
Request parameters
ParameterRequiredDescription
grantTypeYesOAuth grant type. For centralized applications: client_credentials
clientIdYesClient identifier
clientSecretYesClient secret
Response fields — Success (200)
FieldDescriptionExample
accessTokenJWT representing the access tokeneyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiJlNjkwYjczZC01OTI4LTRkMTctODE2ZC01Y2Y5YjgyZTJhOWUiLCJhdWQiOiJvcmRlciIsInVzZXJfbmFtZSI6ImU2OTBiNzNkLTU5MjgtNGQxNy04MTZkLTVjZjliODJlMmE5ZSIsInNjb3BlIjpbIm9yZGVyIl0sInRlbmFudElkIjoiNmFjNjkxZDEtMjZjNi00ZmVkLWJmN2ItOTEwMzJkNTM4NWZkIiwiaXNzIjoiaUZvb2QiLCJtZXJjaGFudF9zY29wZSI6WyI2YjQ4N2EyNy1jNGZjLTRmMjYtYjA1ZS0zOTY3YzIzMzE4ODI6b3JkZXIiXSwiZXhwIjoxNjEyMjMwNDU5LCJpYXQiOjE2MTIyMDg4NTksIm1lcmNoYW50X3Njb3BlZCI6dHJ1ZSwiY2xpZW50X2lkIjoiZTY5MGI3M2QtNTkyOC00ZDE3LTgxNmQtNWNmOWI4MmUyYTllIiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9DTElFTlQiXX0.lYqdxjHoOksq8COqJ-VZxzd524MhVzH7hkMfp5zGTpqzp26z5XJwOPHAy7L6oyagUgRfxntKeu0Up_JHgJ-Vr0h5Y9wY4XHcK1yxpFXFB5f5ilGDB0hVN3UGa4GBqeVpCbAPQUl4VhbF2byeL9PuO4TfTZmoWyuec9-xEH_nbHg
typeToken type. Currently, the only supported type is bearerbearer
expiresInToken expiration time in seconds21600
Response fields — Error Unauthorized (401)
FieldDescriptionExample
error.codeError code for unauthorized requestsUnauthorized
error.messageHuman-readable error descriptionBad credentials
Response fields — Error Internal Server (500)
FieldDescriptionExample
error.codeError code for internal errorsInternalServerError
error.messageHuman-readable error descriptionUnexpected error
The video below demonstrates the implementation of the application credential flow for centralized applications:
Was this page helpful?
Rate your experience in the new Developer portal: