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

Authentication #1

Open
michaelchunn opened this issue Oct 11, 2018 · 2 comments
Open

Authentication #1

michaelchunn opened this issue Oct 11, 2018 · 2 comments

Comments

@michaelchunn
Copy link

Can you explain what these should be? Is the api_key the same that I use with the bugsnag project or it it the key generated by personal auth tokens? Is the project_id the name of the project in bugsnag? What is the account_slug?

'api_key' => env('NOVA_BUGSNAG_API_KEY'),
'project_id' => env('NOVA_BUGSNAG_PROJECT_ID'),
'account_slug' => env('NOVA_BUGSNAG_ACCOUNT_SLUG'),
@daniel-de-wit
Copy link

@michaelchunn

This is how I did it:

1) Create a Personal Access Token at Bugsnag

image


2) Retrieve company info with curl
Replace <your-token> with the one created in step 1.

Run in terminal:

curl --get 'https://api.bugsnag.com/user/organizations' \
       --header 'Authorization: token <your-token>' \
       --header 'X-Version: 2'

Response:

[
  {
    "id": "<company-id>",
    "name": "Example",
    "slug": "example",

    ...
  }
]

Grab the company slug and id.


3) Retrieve project information with curl
Replace <company-id> and <your-token> with data from step 1 & 2.

curl --get 'https://api.bugsnag.com/organizations/<company-id>/projects' \
       --header 'Authorization: token <your-token>' \
       --header 'X-Version: 2'

Response:

[
  {
    "id": "<project-id>",
    "slug": "my-project",
    "name": "My Project",
    
    ...
  },

  ...

]

Search for your project name and grab the id.


4) Fill .env

# Nova Bugsnag
NOVA_BUGSNAG_API_KEY=<your-token>
NOVA_BUGSNAG_PROJECT_ID=<project-id>
NOVA_BUGSNAG_ACCOUNT_SLUG=<company-slug>

Hope this helps.

@saleh-old
Copy link

saleh-old commented Mar 29, 2020

The curl command did not return a response for me.

It'll be nice to add this to the README file. I was looking for it too.

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

3 participants