OAuth sample apps
BlackBerry
provides the following sample apps that demonstrate how to use the BlackBerry Web
Services
REST APIs with OAuth. The samples are available as a downloadable .zip package. The package includes a readme file that explains each sample in detail.The instructions in this document refer to these sample apps to clarify certain details or steps.
Java samples
Sample name |
Description |
---|---|
SampleWithAuthorizationCodeAndClientSecret.java |
A sample app that uses the authorization_code grant type and a client secret |
SampleWithClientCredsAndClientSecret.java |
A sample app that uses the client_credentials grant type and a client secret |
SampleWithClientCredsAndPrivateKey.java |
A sample app that uses the client_credentials grant type and a private key |
PowerShell samples
Sample name |
Description |
---|---|
SampleWithAuthorizationCodeAndClientSecret.ps1 |
A sample script that uses the authorization_code grant type and a client secret |
SampleWithAuthorizationCodeAndClientSecretRefreshToken.ps1 |
A sample script that uses the authorization_code grant type and a client secret with a refresh token |
SampleWithClientCredsAndClientSecret.ps1 |
A sample script that uses the client_credentials grant type and a client secret |
SampleWithClientCredsAndPrivateKey.ps1 |
A sample script that uses the client_credentials grant type and a private key |
Postman REST client samples
Sample name |
Description |
---|---|
AuthorizationCodeGrant.postman_environment.json |
A Postman environment settings sample that demonstrates the authorization_code grant type variables |
ClientCredentialsGrant.postman_environment.json |
A Postman environment settings sample that demonstrates the client_credentials grant type variables |
PublicRestApiSamples.postman_collection.json |
A Postman sample that uses the environment settings described above to use authorization_code and client_credentials when invoking the BlackBerry Web Services REST APIs |