Skip to main content
POST
/
file
/
get-drive-signed-url
Get Google Drive Signed URL
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/file/get-drive-signed-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "driveFileId": "drive-file-id-123",
  "fileMetaData": {
    "originalname": "royalty.csv",
    "mimetype": "text/csv"
  }
}'
{
  "success": true,
  "message": "Signed Google Drive upload URL generated",
  "data": {
    "signedUrl": "https://storage.googleapis.com/royalti-uploads/royalty/drive-file-id-123?signature=..."
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/file/get-drive-signed-url', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "driveFileId": "sample-driveFileId",
    "fileMetaData": {
      "originalname": "sample-originalname",
      "mimetype": "sample-mimetype"
    }
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
driveFileId
string
required
fileMetaData
object
required

Response

Signed Google Drive upload URL generated

success
boolean
default:true
message
string
data
object