Create an API credential
How to create an API credential via API
To create a new API credential, send a POST
request to the /api/api_credentials
endpoint, passing the resource arguments in the request body.
Request
POST https://provisioning.commercelayer.io/api/api_credentials
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.name |
| Required |
attributes.kind |
| Required |
attributes.redirect_uri |
| Optional |
attributes.expires_in |
| Optional |
attributes.mode |
| Optional |
attributes.custom |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.organization |
| Required |
relationships.role |
| Optional |
Example
The following request creates a new API credential:
Last updated