Skip to content

oauth client credentials

toxisch edited this page Apr 7, 2016 · 2 revisions

OAuth Client Credentials Tutorial

Note: The Swisscom OAuth is only usable if it is approved and granted by the API team - contact us via the contact form.

This tutorial describes an easy way to get an OAuth authorization code & access token and shows the integration flow.

Tools:

1. Encode your client id and your client id secret

Go to the page Base64 Decode and Encode and enter %YOUR_CLIENT_ID%COLON%YOUR_CLIENT_ID_SECRET% and click > ENCODE < .

Encode your credentials

Use this result for the authorization in step 2.

2. Get the Access token

Open you terminal and type

Use the result of step 1 to replace %YOUR_CLIENT_ID%:%YOUR_CLIENT_ID_SECRET%(As BASE64)

Response Payload:

{
    "access_token": "KASDFHDASHFSASHAS_DHAISDHFSAIDS",
    "scope": "scope1 scope2",
    "token_type": "bearer",
    "expires_in": "2591999"_
}

3. Ready to use the Access token

As example: Voice Voip Numbers as a curl call

Clone this wiki locally