Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here!
Forum Discussion
rafstahelin
2 months agoNew member | Level 2
API Path Resolution Issue with Lambda Function
Dropbox Forum Post: API Path Resolution Issue with Lambda Function
The Problem I'm having an issue with my AWS Lambda function that uploads files from an S3 bucket to Dropbox. Despite using a token...
rafstahelin
2 months agoNew member | Level 2
thanks for that. only thing is i cannot find my
i am running:
curl -X POST https://api.dropboxapi.com/2/users/get_current_account \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN"
but i am not getting my YOUR_NAMESPACE_ID back. is there another way of getting it?
DB-Des
Dropbox Community Moderator
2 months agoWhat you are wanting to retrieve from the response from the /2/users/get_current_account endpoint is the user's 'root_namespace_id'.
Feel free to share the response you are receiving so we can better assist. Please remove any personal identifiable information though.
- rafstahelin2 months agoNew member | Level 2
Progress So Far:
Critical Information Retrieved:
Obtained my root namespace ID: xxxxxxxx
Obtained my member ID: xxxxxxx
Added team_data.content.write and other team permissions to my appImplementation:
Successfully modified my AWS Lambda function to include both the namespace ID and member ID
Implemented the correct headers as advised
Updated my access token after adding the new permissions
Simplified the target path to /output-eagle/{filename} to eliminate potential path complexity issuesCurrent Issue:
Despite implementing all the recommended changes, I'm still receiving a "409 Conflict" error with the message:
{"error_summary": "path/no_write_permission/...", "error": {".tag": "path", "reason": {".tag": "no_write_permission"}, "upload_session_id": "pid_upload_session:ABIJH3zrQHGELnZnhSrIXYOcu2U9_8zfcTi0nbk8vg-kKQkKnA"}}
Current API Request Details:
python# Headers being sent:
headers = {
'Authorization': f'Bearer {dropbox_token}',
'Content-Type': 'application/octet-stream',
'Dropbox-API-Select-User': 'xxxxxxx',
'Dropbox-API-Path-Root': json.dumps({
".tag": "namespace_id",
"namespace_id": "xxxxxxxxx"
}),
'Dropbox-API-Arg': json.dumps({
'path': '/output-eagle/filename.jpg',
'mode': 'add',
'autorename': True,
'mute': False
})
}also tried:
headers = {
'Authorization': f'Bearer {access_token}',
'Dropbox-API-Select-User': member_id,
'Dropbox-API-Path-Root': json.dumps({
".tag": "root", # Changed from "namespace_id"
"root": root_namespace_id
}),
# Other headers...
}
I've confirmed that:My access token was refreshed after adding the permissions
I'm using the correct member ID and namespace ID
My app has the following permissions enabled:team_data.member
team_data.team_space
team_data.content.write
files.team_metadata.write
files.team_metadata.readWhat else should I check? Am I missing something in my implementation, or could there be a team-level permission issue that I need to address?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,018 PostsLatest Activity: 3 hours ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!