Howdy! Having trouble setting up the PDP service o...
# permit-saas
a
Howdy! Having trouble setting up the PDP service on docker. INFO Fetching PDP config from control plane… ERROR Expecting value: line 1 column 1 (char 0) CRITICAL Sidecar failed to start … 'NoneType' object has no attribute 'context' This happens on each restart. Even with the correct "dev" PDP environment key, and rotating it a few times, curling https://api.permit.io/v1/pdps/me/config returns a 403 Forbidden. Could you verify the key’s scope or let us know if there’s an updated endpoint we should be hitting? Thanks!
a
Hi @Alec Handal, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
a
Based on the error you're seeing, the 403 Forbidden response indicates an authorization issue with your PDP API key. Let me help you troubleshoot this. The PDP should be fetching its configuration from
<https://api.permit.io/v2/pdps/me/config>
(1) , not the v1 endpoint you mentioned. The correct endpoint for the PDP configuration is:
Copy code
<https://api.permit.io/v2/pdps/me/config>
According to the configuration documentation, the
PDP_API_KEY
must be an Environment-level API Key . A 403 error typically means "I know who you are, but you're not allowed here" (2) - suggesting your key is recognized but lacks the proper permissions. Here's what you should check: 1. ​*Verify your API key is Environment-level*​: The key must be an Environment-level API Key, not a Project or Organization level key (1) 2. ​*Ensure you're using the correct control plane URL*​: The default
PDP_CONTROL_PLANE
should be
<https://api.permit.io>
3. ​*Check your Docker environment variables are set correctly*​:
Copy code
PDP_API_KEY=<your-environment-level-api-key>
To help our engineers investigate further, could you please provide: 1. Which Workspace / Project / Env you are using 2. What calls you are performing (as SDK code or CURL) 3. Which PDP version you are running 4. Relevant logs from your PDP (including the full startup logs if possible) This information will help us determine if there's a configuration issue or if the key permissions need adjustment.
To learn more, see the sources I considered: [[1] Configurations](https://docs.permit.io/concepts/pdp/configuration) [[2] 401 vs. 403 Error Codes: What's the Difference? When to Use Each? (Updated 2024)](https://www.permit.io/blog/401-vs-403-error-whats-the-difference)
a
solved, thanks
ack 1