Developers

Developer Documentation

Everything you need to know to get started

Externalized Authorization

Enforce customer business policies uniformly across all their applications.

Learn more

Consent Enforcement

Define customized consents, specify consent workflows, and register user consents.

Learn more

Relationship-based Access Control

Discover how to authorize end users to share access to a protected digital asset. The relationship-based access control provides an API-based system to define types of resources and relationships.

Learn more

Invitation

curl -X POST /{tenant}/sharing/invitations \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer '
  --data-binary @- << EOF
{
  "relationshipType": "is_coadmin_of",
  "to": {
    "id": "ac78eb90-d347-47bc-8b3f-d47b9c13a21b",
    "type": "subscription"
  },
  "invitor": {
    "id": "auth0|5f59e0795af7e2006a6cbfb5",
    "type": "user"
  },
  "invitee": {
    "contact": {
      "type": "email",
      "value": "alice@scaledaccess.com"
    }
  }
}
EOF
                    
const inputBody = '{
  "relationshipType": "is_coadmin_of",
  "to": {
    "id": "ac78eb90-d347-47bc-8b3f-d47b9c13a21b",
    "type": "subscription"
  },
  "invitor": {
    "id": "auth0|5f59e0795af7e2006a6cbfb5",
    "type": "user"
  },
  "invitee": {
    "contact": {
      "type": "email",
      "value": "alice@scaledaccess.com"
    }
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer '
};

fetch('/{tenant}/sharing/invitations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

                        
String json = "{\"relationshipType\":\"is_coadmin_of\",\"to\":{\"id\":\"ac78eb90-d347-47bc-8b3f-d47b9c13a21b\",\"type\":\"subscription\"},\"invitor\":{\"id\":\"auth0|5f59e0795af7e2006a6cbfb5\",\"type\":\"user\"},\"invitee\":{\"contact\":{\"type\":\"email\",\"value\":\"alice@scaledaccess.com\"}}}";

URL url = new URL("/{tenant}/sharing/invitations");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
con.setRequestProperty("Authorization","Bearer ");

OutputStream os = con.getOutputStream();
os.write(json.getBytes("UTF-8"));
os.close();

BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String output;
while ((output = in.readLine()) != null) {
    System.out.println(output);
}
                        
$headers = (
    'Content-Type' => 'application/json'
    'Authorization' => 'Bearer ',
);

$client = new \GuzzleHttp\Client();

$request_body = json_decode("{\"relationshipType\":\"is_coadmin_of\",\"to\":{\"id\":\"ac78eb90-d347-47bc-8b3f-d47b9c13a21b\",\"type\":\"subscription\"},\"invitor\":{\"id\":\"auth0|5f59e0795af7e2006a6cbfb5\",\"type\":\"user\"},\"invitee\":{\"contact\":{\"type\":\"email\",\"value\":\"alice@scaledaccess.com\"}}}", true);

try {
    $response = $client->request('POST','/{tenant}/sharing/invitations', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
    print_r($e->getMessage());
}
                        
import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer '
}
json = {
  "relationshipType": "is_coadmin_of",
  "to": {
    "id": "ac78eb90-d347-47bc-8b3f-d47b9c13a21b",
    "type": "subscription"
  },
  "invitor": {
    "id": "auth0|5f59e0795af7e2006a6cbfb5",
    "type": "user"
  },
  "invitee": {
    "contact": {
      "type": "email",
      "value": "alice@scaledaccess.com"
    }
  }
}

r = requests.post('/{tenant}/sharing/invitations', headers = headers, json = json)

print(r.json())
                        
string myJson = "{\"relationshipType\":\"is_coadmin_of\",\"to\":{\"id\":\"ac78eb90-d347-47bc-8b3f-d47b9c13a21b\",\"type\":\"subscription\"},\"invitor\":{\"id\":\"auth0|5f59e0795af7e2006a6cbfb5\",\"type\":\"user\"},\"invitee\":{\"contact\":{\"type\":\"email\",\"value\":\"alice@scaledaccess.com\"}}}";
using (var client = new HttpClient())
{
    client.DefaultRequestHeaders.Add("Authorization", "Bearer ");
    var response = await client.PostAsync(
        "/{tenant}/sharing/invitations", 
        new StringContent(myJson, Encoding.UTF8, "application/json"));
}
                        
Picture of iPhone showing a Scaled Access email where David invites Alice to view Resource ID1.

Request token

Token
eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs
Decoded
{
  "sa:invitation:id": "c1820bf6-9dc1-4c35-b162-76775acfbf29",
  "sa:invitation:relationship": "is_coadmin_of",
  "sa:invitation:direction": "to",
  "exp": 1599813186
}
          

Acceptance

curl -X POST /{tenant}/sharing/invitations/accept \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer '
  --data-binary @- << EOF
{
  "acceptor": {
    "id": "auth0|5f59e58555111f006ffee5e7",
    "type": "user"
  },
  "requestToken": "eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs"
}
EOF
                            
const inputBody = '{
  "acceptor": {
    "id": "auth0|5f59e58555111f006ffee5e7",
    "type": "user"
  },
  "requestToken": "eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs"
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer '
};

fetch('/{tenant}/sharing/invitations/accept',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
                            
String json = "{\"acceptor\":{\"id\":\"auth0|5f59e58555111f006ffee5e7\",\"type\":\"user\"},\"requestToken\":\"eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs\"}";

URL url = new URL("/{tenant}/sharing/invitations/accept");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
con.setRequestProperty("Authorization","Bearer ");

OutputStream os = con.getOutputStream();
os.write(json.getBytes("UTF-8"));
os.close();

BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String output;
while ((output = in.readLine()) != null) {
    System.out.println(output);
}
                            
$headers = (
    'Content-Type' => 'application/json'
    'Authorization' => 'Bearer ',
);

$client = new \GuzzleHttp\Client();

$request_body = json_decode("{\"acceptor\":{\"id\":\"auth0|5f59e58555111f006ffee5e7\",\"type\":\"user\"},\"requestToken\":\"eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs\"}", true);

try {
    $response = $client->request('POST','/{tenant}/sharing/invitations/accept', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
    print_r($e->getMessage());
}
                            
import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer '
}
json = {
  "acceptor": {
    "id": "auth0|5f59e58555111f006ffee5e7",
    "type": "user"
  },
  "requestToken": "eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs"
}

r = requests.post('/{tenant}/sharing/invitations/accept', headers = headers, json = json)

print(r.json())
                            
string myJson = "{\"acceptor\":{\"id\":\"auth0|5f59e58555111f006ffee5e7\",\"type\":\"user\"},\"requestToken\":\"eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6InN0YXJlYXdheWRldi1yc2EifQ.eyJtaWFhOmludml0YXRpb246aWQiOiJjMTgyMGJmNi05ZGMxLTRjMzUtYjE2Mi03Njc3NWFjZmJmMjkiLCJtaWFhOmludml0YXRpb246cmVsYXRpb25zaGlwIjoiaXNfY29hZG1pbl9vZiIsIm1pYWE6aW52aXRhdGlvbjpkaXJlY3Rpb24iOiJ0byIsImV4cCI6MTU5OTgxMzE4Nn0.YUDGt_xhdRrzOduwLr9vqYwvqy4rpV7bNLBJuIPnV1aEnF2o14b1PgVpo2FPcD2DtWpggWCmqGv_a-bMzibFVseX6eN3wSYZ7QmSvoC7odxOxu59jdrzUsWdkNiDdbPBJaZfT6F5mXa0fJdANvLJu7yDP-pyPj2ymE7VleZNzwGOz-hyM0hyf-P3dtKzbPDhIHBw31xQYP8Y0iXE1fqi7N-JiMRpOoYQJIVkPGH365UxgSFnxgkPxGj_1ZLlbqkx9bz-I5C402ToUgqrI5px3mpG2VsyJnnhqfxM0qjKp6_v0vNnWpNxleunLCySjziidT5knh2pQFj_p4UpfFbXLyxCTbn2KZC_XDeb6PXIrHKBHABshDlR8ogC4kPwEeRONIb8TIlfwwofwpOd5nIvyA65qmSw8CEv8nVbnkHnSyKTnAmg9NOaMHanJ5YZ-sBj2AYEeIcreMeLTTPBCtGF_Gu3e2UXHe2iB7H2427mKL_CBRQNjgaP2-CV3xn9ay-0jlDA7iSgihp8tQFyS0-laRLdrDlFQxs_XU1thIY1w3eTQbkDYjqO4oR8ekubD_d2r7xbwTqDTDUX20d0QtBkFRd9B7ehmZyJWwYdd8TQRGgtkz6Ah-dB7iPpjiA3XvhoYdNUTVCh9tlHeMWmMH6lsqKbPrcogXpwQRDmc8FJXqs\"}";
using (var client = new HttpClient())
{
    client.DefaultRequestHeaders.Add("Authorization", "Bearer ");
    var response = await client.PostAsync(
        "/{tenant}/sharing/invitations/accept", 
         new StringContent(myJson, Encoding.UTF8, "application/json"));
}
                            
Picture of iPhone showing a Scaled Access email where David invites Alice to view Resource ID1.

Event Stream

Configure what types of events will be streamed to which of the tenant's API endpoints.

Learn more

Email Management

Send emails making use of a specified template.

Learn more