AuthAPI Key
API Key
Create and use an API Key to access the Noroff API.
The API Key model
Prop | Type | Default |
---|---|---|
name | string | API Key |
status | string | ACTIVE |
key | string | - |
Create an API Key
POST/auth/create-api-key
You can use this endpoint to create an API Key.
You do not need to provide any data in the request body, but you can optionally provide a name
value.
A successful response will return a 201 Created
status code and the newly created API Key.
Restrictions
- If set, the
name
value must be less than 32 characters.
Types
Prop | Type | Default |
---|---|---|
name | string | API Key |
Using the API Key
You use the API Key by sending it in the X-Noroff-API-Key
header, along with the access token of the requesting user.