Telnyx API key says "invalid credential"
# support
j
API key is 100% correct. So either the connection is bad, or it's because the telnyx number is not verfied (pending number order)
v
Hi there! 👋 I see you're having an issue with your Telnyx API key showing "invalid credential". Let me help you troubleshoot this! Even though you're sure the API key is correct, there are several other reasons this error might occur: Common causes for "invalid credential" errors: - Using a public key when a private key is required (or vice versa) - Extra white spaces or formatting issues with the API key - New API key that hasn't fully activated yet (there can be a propagation delay) - Revoked or expired API key - Incorrect API key for the environment you're using (development vs. production) - Permissions issues with your API key If you suspect connection issues: - Check your network settings to ensure outgoing connections to Telnyx API servers aren't blocked - Try testing the API endpoint manually using tools like
curl
or Postman - Implement logging to track the API request flow and identify where the breakdown occurs - Consider implementing retry logic for your API requests Regarding your pending number order: While I don't have specific information on how pending number orders affect API authentication, you can check your number order status in the Telnyx Portal under the Phone Numbers section. If you're using a number that's still pending approval, this could potentially cause issues with certain API calls. Let me know if any of these suggestions help resolve your issue! Sources: - [Common Reasons for "Invalid Credential" Error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333897284894724188) - [Troubleshooting Steps for Telnyx API Connection](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334203359367925760) - [Telnyx Number Order Verification](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1316958070177403011)