Authentication
Summary
The Marketplace Public API is authenticated via OAuth 2.0, with API keys obtained from https://channelfireball.com/my-store
Pre-requisites
Seller Account
The Marketplace Public API is intended for customers with a Seller Account. Register an account in https://channelfireball.com and make sure it is upgraded to a Seller Account.
Integration credentials
Your integration credentials can be obtained from the Store Management portal: https://channelfireball.com/my-store
Example:
API Key | API Secret |
---|---|
3a3f43c4-190b-45a9-859b-ceb5758e6963@cfb.gg | b5106182-bdb4-4600-9c6b-2dfb16bb8ae1 |
OAuth 2.0
The Marketplace APIs are secured by OAuth 2.0 and JWT. All requests to the API have to include an Authorization token that can be obtained using the password grant defined in OAuth 2.0.
Example:
curl -L -X POST 'https://api.channelfireball.com/auth/realms/cfb-marketplace-prod/protocol/openid-connect/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=marketplace-buyer-portal' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'scope=openid' \
--data-urlencode 'username=4d53c6d9-9279-467d-b2d9-0c207a2ac368@cfb.gg' \
--data-urlencode 'password=001e00eb-2390-4386-9ffc-02d5c173b0cb'
In a successfull response, the access_token returned can be used to authenticate further API requests.
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXaXJJc0JOYmFCcXNXNHEzd1RrcUNmdUVDRG82YUVFRS00cmdoWklDbVQ4In0....",
"expires_in": 28800,
"refresh_expires_in": 28800,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI5ZDZhZjcxZC0yNWUwLTQ5ODMtYmRiYS05OTY2Zjk2OTA3YzgifQ...",
"token_type": "Bearer",
"id_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXaXJJc0JOYmFCcXNXNHEzd1RrcUNmdUVDRG82YUVFRS00cmdoWklDbVQ4In0...",
"not-before-policy": 0,
"session_state": "f6c1bfa7-d198-44e6-af3a-f0fbafbe5c13"
}
In order to access the secured resources, include the access_token in the Authorization
header:
curl -L 'https://api.channelfireball.com/auth/realms/cfb-marketplace-prod/protocol/openid-connect/userinfo' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXaXJJc0JOYmFCcXNXNHEzd1RrcUNmdUVDRG82YUVFRS00cmdoWklDbVQ4In0...'