twilio / twilio-webchat-react-app

Twilio Webchat React App is an application that demonstrates a website chat widget built with Twilio's Conversations JS SDK, Twilio Paste Design library and Create React App.
MIT License
63 stars 71 forks source link

API key does not start with "SG." #32

Open natalieatosh opened 1 year ago

natalieatosh commented 1 year ago

When running yarn server I get an error that "API key does not start with "SG." assuming that means it expects that value to start with 'sg' I read through the instructions, and I believe the Twilio API key should start with SK, so I am not sure why this is throwing an error. Every API key i have generated the SID starts with SK. Is it expecting a different value?

Dervalanana commented 1 year ago

Piggybacking on this concern, I'm seeing no where in twilio documentation/examples that indicate any address SIDs that start with IG. They are all showing AD starts, and when attempting to send a message the webchat orchestrator is returning ADxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is invalid (with the numbers in place of the x's of course)

natalieatosh commented 1 year ago

@Dervalanana so I learned the SG SID is related to SendGrid API key, the docs make this seem like it's optional, but I couldn't get this running without setting up a sendgrid account and using that API key value in my .env file. It's just a bad error message.

I found my 'IG' value from twilio console>flex>manage>messaging>select Chat>the addresses in the table should start with 'IG'

leslieascott commented 1 year ago

Under 'Emailing Transcripts', it says 'Add the SendGrid API key and verified email to the .env file as the values for SENDGRID_API_KEY and FROM_EMAIL respectively.' Would the value for the apiKey not be the one that starts with 'SK'? We don't want to email chat transcripts and have no need to pay for a SendGrid account.

The error for the api key needs to be fixed or the documentation needs better clarity. Please and Thank you!