Introduction
Scribe securely stores all private data in the cloud. In order to upload, access and delete data via the API, all requests must be authenticated.
In order to authenticate, you will first need a Scribe account and a client ID.
API requests need to be authenticated using AWS sigv4. We recommend using one of our auth libraries for this.
Scribe SDKs
Scribe Private Information SDKs are the recommended method of accessing the Private Information API. The SDKs handle authentication (via the Scribe auth libraries).
SDK Example (Python)
from ScribeMi import MI
client = MI({
'API_URL': 'mi.scribelabs.ai/v1',
'REGION': 'eu-west-2',
'IDENTITY_POOL_ID': 'Contact Scribe for authentication details',
'USER_POOL_ID': 'Contact Scribe for authentication details',
'CLIENT_ID': 'Contact Scribe for authentication details',
})
# Authenticate with username / password
client.authenticate({ 'username': 'myUsername', 'password': 'myPassword' })
# OR with refresh token
client.authenticate({ 'refresh_token': 'myRefreshToken' })
SDK Example (TypeScript)
import { ScribeMIClient } from '@scribelabsai/mi';
const client = new ScribeMIClient({
API_URL: 'mi.scribelabs.ai/v1',
REGION: 'eu-west-2',
IDENTITY_POOL_ID: 'Contact Scribe for authentication details',
USER_POOL_ID: 'Contact Scribe for authentication details',
CLIENT_ID: 'Contact Scribe for authentication details',
});
// Authenticate with username / password
await client.authenticate({ username: 'myUsername', password: 'myPassword' });
// OR with refresh token
await client.authenticate({ refreshToken: 'myRefreshToken' });
Scribe auth libraries
Without using the Scribe SDKs, you can use Scribe auth libraries directly:
Flow
-
If you never have accessed your Scribe account, it probably still contains the temporary password we generated for you. You can change it directly on the platform or with the
change_password
method. You won't be able to access anything else until the temporary password has been changed. -
Once the account is up and running, you can request new tokens with
get_tokens
. You will initially have to provide your username and password. The access and id tokens are valid for up to 30 minutes. The refresh token is valid for 30 days. -
While you have a valid refresh token, you can request fresh access and id tokens with
get_tokens
but using the refresh token this time, so you're not sending your username and password over the wire anymore. -
In case you suspect that your refresh token has been leaked, you can revoke it with
revoke_token
. This will also invalidate any access/id token that has been issued with it. In order to get a new one, you'll need to use your username and password again.