简体   繁体   中英

Accessing the HipChat API With Username and Password

I'm attempting to write a simple script that I can run from my command line that will send warning messages to certain users on HipChat, and I've run into some issues around authentication. Ideally, I'd like to have the script prompt the user for their HipChat username and password, and use them to log into the Hipchat API. However, it seems that Hipchat doesn't offer this functionality, and I'm not sure what to do.

The documentation seems to suggest I manually generate a token, and use that instead. While this is definitely an option, it seems a little less user friendly, so I wanted to double check that there wasn't an alternative before going ahead. I want to avoid the installation and OAuth flows as much as possible (I don't think they're an option).

Any thoughts? I'm open to alternative suggestions, although it really seems like Basic Auth or simple token generation would be an option.

The hipchat APIs don't support username+password as authentication, for security reasons (you don't want your password flowing through every API call).

The OAuth flow you mention is used for the integrations. If you want to try the API manually (or to script them), there's a simpler auth flow:

Full information is available here: https://developer.atlassian.com/hipchat/guide/hipchat-rest-api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM