Provider Auth Exports

An auth export lets you extract OAuth tokens or credentials from Metorial to use in other systems, avoiding duplicate authentication flows.

Provider Auth Exports object

Attributes

object

String

String representing the object's type

id

String

Unique auth export identifier

note

String

Note explaining the export reason

metadata

ObjectNullable

Custom key-value pairs for storing additional information

provider_auth_config_id

String

Auth config ID that was exported

value

Object

The exported credential data (access token, refresh token, etc.)

created_at

Date

Timestamp when created

{
"object": "provider.auth_export",
"id": "pace_7yZaBcDeFgHjKlMn",
"note": "Exported for backup purposes",
"metadata": {
"exported_by": "admin@company.com",
"reason": "backup"
},
"provider_auth_config_id": "pac_8pQrStUvWxYzAbCd",
"value": {
"access_token": "gho_xxxxxxxxxxxxxxxxxxxx",
"refresh_token": "ghr_xxxxxxxxxxxxxxxxxxxx",
"token_type": "bearer",
"scope": "repo,read:user"
},
"created_at": "2025-09-15T10:30:00.000Z"
}

List provider auth exports

Returns a paginated list of provider auth exports.

URL Parameters

provider_deployment_id

String

The unique identifier for the provider_deployment

provider_auth_config_id

String

The unique identifier for the provider_auth_config

Query Parameters

limit

NumberOptional

Maximum number of items to return (1-100)

after

StringOptional

Return items after this ID

before

StringOptional

Return items before this ID

cursor

StringOptional

Pagination cursor from a previous response

order

EnumOptional

Sort order for results

GEThttp://api.metorial.com/provider-deployments/:provider_deployment_id/auth-configs/:provider_auth_config_id/exports
curl -X GET "https://api.metorial.com/provider-deployments/pro_Rm4Mnheq2bfEPhBhP7SY/auth-configs/pro_Rm4Mnheq2bfEPhBhP7SY/exports" \
-H "Authorization: Bearer metorial_sk_..."

Get provider auth export

Retrieves a specific provider auth export by ID.

URL Parameters

provider_deployment_id

String

The unique identifier for the provider_deployment

provider_auth_config_id

String

The unique identifier for the provider_auth_config

provider_auth_export_id

String

The unique identifier for the provider_auth_export

GEThttp://api.metorial.com/provider-deployments/:provider_deployment_id/auth-configs/:provider_auth_config_id/exports/:provider_auth_export_id
curl -X GET "https://api.metorial.com/provider-deployments/pro_Rm4Mnheq2bfEPhBhP7SY/auth-configs/pro_Rm4Mnheq2bfEPhBhP7SY/exports/pro_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Create provider auth export

Exports authentication credentials from a provider.

URL Parameters

provider_deployment_id

String

The unique identifier for the provider_deployment

provider_auth_config_id

String

The unique identifier for the provider_auth_config

Request Body

note

String

metadata

ObjectOptional

Custom key-value pairs for storing additional information

POSThttp://api.metorial.com/provider-deployments/:provider_deployment_id/auth-configs/:provider_auth_config_id/exports
curl -X POST "https://api.metorial.com/provider-deployments/pro_Rm4Mnheq2bfEPhBhP7SY/auth-configs/pro_Rm4Mnheq2bfEPhBhP7SY/exports" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"note": "example_note",
"metadata": {}
}'