How to authenticate with API token generated in the project ?
I am getting an error of Authentication whenever I am trying to run the scriptrunner script for Post action. Please guide on this. I am trying to create project with Issue key and have script written for the same. I have additionally tried with Automation rules as well, but there also with Send Web request its asking me for Authentication and nowhere I could find authentication window where I can put my org email and API token too.
To authenticate with an API token in your scriptrunner script or automation rule, you’ll need to use Basic Authentication. Here's how you can do it:
Basic Authentication:
Authorization: Basic base64encode(email:API_token) base64 encoding for your email address and the API token together. For example, if your email is user@example.com and your API token is abc123, it would look like this:base64encode(user@example.com:abc123) The result is what you'll include in the Authorization header.
For ScriptRunner: When making the request in ScriptRunner, make sure your request includes the encoded Authorization header with the basic auth format.
For Automation Rules (Send Web Request): You’ll need to add the encoded Authorization header in the “Headers” section when configuring the “Send Web Request” action.
Let me know if you need further clarification! 😊
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.