New SectionURL NameHow-to-generate-an-Access-Token-for-BayRewards-APITitleHow to generate an Access Token for BayRewards APIOwnerGayatriArticle DetailsContentHelp ContentTo access and authenticate API requests in BayRewards, you must first generate an access token using your Custom App credentials. Follow the steps below to create the app, obtain credentials, and generate your access token. Step 1: Log in to BayRewards Log in to your BayRewards account. Navigate to the Integrations section. Under Integrations, click on Custom App (as shown in the image below). Step 2: Create a Custom App On the Custom App page, click Create (refer to the image below). Enter a name for your app. Select the relevant or required scopes to define the level of API access you need. Click Create once all details are filled in. After creation, you’ll receive the following credentials: Scope Client ID Client Secret Step 3: Generate an Access Token Open the BayRewards API Documentation. Locate the Authentication API section and find the Generate Access Token endpoint. Provide the following fields in your request: client_id: Your generated Client ID client_secret: Your generated Client Secret grant_type: Always use client_credentials scope: The scope you selected while creating the custom app. Once you submit the request, you’ll receive a response containing your access token. Step 4: Use the Access Token Include the access token in every API request under the Authorization header using the Bearer Token type. Authorization: Bearer <access_token> Important Notes 🔄 Token Expiry: The access token expires every 60 minutes. You’ll need to generate a new one after it expires. ⚙️ Scope Requirement: While APIs will technically function without a scope, you won’t be able to access any endpoints using that access token unless a valid scope is set during app creation.