Skip to main content
Solved

The reason of 403 error with Censys Platform API

  • February 22, 2025
  • 5 replies
  • 183 views

When I tried to search with Censys Platform API, I encountered 403 error.

Search / Query

 

Request:

curl --request POST \
     --url 'https://api.platform.censys.io/v3/global/search/query?org=zzzz \
     --header 'accept: application/vnd.censys.api.v3.search.v1+json' \
     --header 'authorization: Bearer censys_xxxxxxxxx_xxxxxxxxxxxxxxxxx' \
     --header 'content-type: application/json' \
     --data '{"query":"8.8.8.8"}'

 

Response:

{
  "title": "Forbidden",
  "status": 403,
  "detail": "Forbidden"
}

Best answer by MattK_Censys

Hi again, sorry for the hold-up on this. Does your user have the API Access role?

You can check this within the Platform UI under Settings > Account Management > Organization Settings > Members.

If your user has the API Access role, you will see it in the entry for your user, as shown in the image below.

If you do not see the API Access role, click the three-dot icon on the user’s row. Click the pencil icon, and then on the Edit Member page check the API Access role and click Update.

5 replies

MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • February 24, 2025

Hey there! Are you using the correct orgID? Try using the orgID that is appended to Platform URLs when you are logged in to the web interface. Let me know if that works. Thanks!


  • Author
  • New Participant
  • February 25, 2025

Thank you for your comment!

I used my actual org id but it returns the same error.

 

curl --request POST \
     --url https://api.platform.censys.io/v3/global/search/query \
     --header 'X-Organization-ID: zzzzz' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer censys_xxxxxxxxx_xxxxxxxxxxxxxxxxx' \
     --header 'content-type: application/json' \
     --data '{"query":"8.8.8.8"}'


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • Answer
  • February 28, 2025

Hi again, sorry for the hold-up on this. Does your user have the API Access role?

You can check this within the Platform UI under Settings > Account Management > Organization Settings > Members.

If your user has the API Access role, you will see it in the entry for your user, as shown in the image below.

If you do not see the API Access role, click the three-dot icon on the user’s row. Click the pencil icon, and then on the Edit Member page check the API Access role and click Update.


  • Author
  • New Participant
  • February 28, 2025

I have not enabled API access and finally I can execute API!

Thank you for your kind support!


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • February 28, 2025

Glad to hear it. Thanks for your patience. We will add that information to our documentation shortly.