@extends('layouts.app') @section('title', 'API Key') @push('styles') @endpush @section('content')

API Keys

{{-- Alerts --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Your API keys authenticate requests to the WhatsApp API. Keep them safe.
{{-- API Keys Table --}}
@if(count($apiKeys) > 0) @foreach($apiKeys as $key) @endforeach @else @endif
Instance ID WhatsApp Number API Key Created At Last Used Instance Status Actions
{{ $key['instance_id'] }} {{ $key['whatsapp_user_id'] }} {{ substr($key['api_key'], 0, 8) }}... {{ formatTimestamp($key['created_at']) }} @if($key['last_used']) {{ formatTimestamp($key['last_used']) }} @else Never @endif @php $statusClass = 'status-pending'; if($key['instance_status'] === 'active') { $statusClass = 'status-active'; } elseif($key['instance_status'] === 'inactive') { $statusClass = 'status-inactive'; } @endphp {{ ucfirst($key['instance_status']) }}
@csrf
No API Keys Found

You haven’t created any instances yet. Go to the Dashboard and click the button to create a new instance. Scan the QR code to link your WhatsApp number, then return here to retrieve your API key.

{{-- --}}
{{-- API Usage Example --}}
API Usage Example
                                
                        curl --location '{{ config('services.node_api.url') }}/send-message' \
                        --header 'Content-Type: application/json' \
                        --header 'Authorization: YOUR_API_KEY' \
                        --data '{
                            "recipients": ["254712345678"],
                            "type": "text",
                            "text": "Trying new features"
                        }'
                                
                            
{{-- Security Notes --}}
Important Security Notes
  • Keep your API keys confidential
  • Do not expose them in client-side code
  • Rotate your API keys if compromised
  • Use environment variables in production
@endsection @push('scripts') @endpush