Skip to main content

Easy description to get an accessToken

Hi everybody!
Ralph from our community has described a very easy to use documentation "how to get an accessToken" .
Thanks, 
Ralph

First Step

Get your ConsumerKey & ConsumerSecret by creating your App in "My Apps"

 

Second Step

Encode ConsumerKey & ConsumerSecret (output will be used in curl-request):

$ echo -n ConsumerKey:ConsumerSecret | base64

 

Third Step

Use Encoded ConsumerKey & ConsumerSecret in curl-request:

curl -X POST \
  'https://api.srgssr.ch/oauth/v1/accesstoken?grant_type=client_credentials' \
  -H 'Authorization: Basic <Encoded Consumer Key & Consumer Secret>' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Length: 0' \
  -H 'Postman-Token: 24264e32-2de0-f1e3-f3f8-eab014bb6d76'

 

Forth Step

Use received access_token in curl request:

curl -X GET \
  'http://api.srgssr.ch/rts/archives/v2/audios' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: 56128353-805e-4974-6689-5ef6d86e2d80'

About us

The SRG SSR API team is proud to share our data for the friends, community, customer and partners.