Jump to content

Need help using Nebula API requests in python


Go to solution Solved by Lee-Wei,

Recommended Posts

Hello everyone,

I am reaching out regarding help with trying to pull requests from the Malwarebytes Nebula API. 

Currently I have a python scrip where I am just trying to retrieve quarantine data: https://api.malwarebytes.com/nebula/v1/docs#tag/Quarantine

When I run the script I keep getting an error: 

 

{'error': 'missing_header', 'error_description': 'Missing required header', 'error_code': 2}

 

Here is my code

import requests
import os
import json

malwarebytesclientid = "ITS_A_SECRET"
malwarebytesclientsecret = "ITS_A_SECRET"
malwarebytesaccountid = "ITS_A_SECRET"  

#malwarebytes requests
malheaders = {"accountid":malwarebytesaccountid, "authorization":"Bearer " + malwarebytesclientsecret}
mstatusresponse = requests.get(ninjaurl, headers=malheaders)
mstatus_json = mstatusresponse.json()
print(mstatus_json)

I have a clientid, a clientsecret, and the accountid but yet its still saying I am missing a header. 

Does anyone have any suggestions to find the missing header required to pull a request?

 

Thank you for your time, 

Link to post
Share on other sites

31 minutes ago, Porthos said:

I would highly suggest that you open a support ticket with Business Support to work with them directly.

Submit Support Ticket

It can take a few days for a response as ticket volume is high at this time.

Thanks - I just made a support ticket. I will update this forum post if I get any good results that maybe helpful for anyone else. 

 

Thanks again. 

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.