# Token ## Generate Token - [POST /auth/token](https://developers.bcb.bm/apis/open-banking-api/open-banking-api/token/token_generatetoken.md): Generates a JWT access token based on provided client credentials. Use this POST endpoint to authenticate using your clientId and clientSecret and receive a JWT token. Token Validity: 40 minutes from the time of issuance. Endpoint: https://api.bcb.bm/auth/token Required Headers: - Content-Type: application/json - Accept: application/json ### Sample Request in JavaScript: javascript async function getToken() { try { const response = await fetch('https://api.bcb.bm/auth/token', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify({ clientId: 'your-client-id', clientSecret: 'your-client-secret' }) }); if (!response.ok) { const errorData = await response.json(); throw new Error(Error: ${errorData.message || response.statusText}); } const data = await response.json(); console.log('JWT Token:', data.token); // Store token securely localStorage.setItem('jwt', data.token); } catch (error) { console.error('Fetch error:', error); } } getToken();