Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLACK_BOT_TOKEN error #4

Closed
x3l51 opened this issue Oct 6, 2017 · 3 comments
Closed

SLACK_BOT_TOKEN error #4

x3l51 opened this issue Oct 6, 2017 · 3 comments

Comments

@x3l51
Copy link
Contributor

x3l51 commented Oct 6, 2017

Hey man, first of all: great job!

Im playing around with your code and tried to get it to work and it does give me an error at line 20

slackbot:20: error: invalid operands of types 'const char [39]' and 'const char [43]' to binary 'operator+'

 #define SLACK_BOT_TOKEN "xoxb-111111111111-abcdefghijklmnopqrstuvwx" // Get token by creating new bot integration at https://my.slack.com/services/new/bot 

                         ^

C:\Users\work\Desktop\arduino-slack-bot-master\arduino-slack-bot-master\slackbot\slackbot.ino:177:57: note: in expansion of macro 'SLACK_BOT_TOKEN'

   http.begin("https://slack.com/api/rtm.start?token=" + SLACK_BOT_TOKEN, SLACK_SSL_FINGERPRINT);

                                                         ^

exit status 1
invalid operands of types 'const char [39]' and 'const char [43]' to binary 'operator+'

Well has it to do with the format of the token? I can't change that. Thanks!

@urish
Copy link
Owner

urish commented Oct 6, 2017

Thank you!

Removing the + sign between "https://slack.com/api/rtm.start?token=" and SLACK_BOT_TOKEN may do the trick. Also, are you using the latest Arduino version with the latest ESP8266 package?

I haven't run this code in about 1.5 years, so things may have changed since.

@x3l51
Copy link
Contributor Author

x3l51 commented Oct 6, 2017

Wow, that was quick! Yeah, the "+" was the issue, it compiled w/o errors just now.

Shall I do a PR?

Thanks so much, Urish!

@urish
Copy link
Owner

urish commented Oct 6, 2017

Yes, please

@x3l51 x3l51 closed this as completed Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants