Skip to content

Commit

Permalink
Merge pull request #10 from beaglesecurity/api-update-v2
Browse files Browse the repository at this point in the history
updated api v1 to v2 && utm added README.md
  • Loading branch information
anees264 authored Dec 26, 2022
2 parents f79ead3 + 50563cd commit dad88fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Beagle is an intelligent and holistic platform to make your applications hack-pr

In short, Beagle finds out how deep your system can be penetrated. Know it before the hackers do!

* [Beagle Security](https://beaglesecurity.com/) - Visit for more Details!
* [Beagle Security](https://beaglesecurity.com/?utm_source=github&utm_medium=3rd_party&utm_campaign=integration) - Visit for more Details!

### Generate your Access Token From Beagle User Settings:
Settings -> Access token -> Generate your new personal access token
Expand Down
14 changes: 8 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ const github = require('@actions/github');
const request = require("request");

try {
const acc_token = process.env.access_token;
const app_token = process.env.application_token;
var api = "https://api.beaglesecurity.com/v1/test/start";
const acc_token = process.env.Authorization;
const app_token = process.env.applicationToken;
var api = "https://api.beaglesecurity.com/rest/v2/test/start/";
var requestData = {
"access_token": acc_token,
"application_token": app_token
"applicationToken": app_token
};
request({
url: api,
method: "POST",
json: requestData
json: requestData,
headers: {
'Authorization': "Bearer " + acc_token
}
}, function (error, response, body) {
if (!error && response.statusCode === 200) {
console.log(body);
Expand Down

0 comments on commit dad88fb

Please sign in to comment.