Make an authenticated API v1.1 request and confirm that your integration is ready.
Before you start
Create API client credentials and use a server-side environment that can protect the client secret.
Make your first request
- Read the client ID and client secret into environment variables without writing the values to shell history.
read -r -p 'Client ID: ' CLOUDNUMBERING_CLIENT_ID
read -r -s -p 'Client secret: ' CLOUDNUMBERING_CLIENT_SECRET
printf '\n'
export CLOUDNUMBERING_CLIENT_ID CLOUDNUMBERING_CLIENT_SECRET
- Request an access token.
- Read the returned
access_tokeninto an environment variable the same way.
read -r -s -p 'Access token: ' CLOUDNUMBERING_ACCESS_TOKEN
printf '\n'
export CLOUDNUMBERING_ACCESS_TOKEN
- List the catalogue available to your organisation.
curl --silent --show-error \
--header "Authorization: Bearer $CLOUDNUMBERING_ACCESS_TOKEN" \
'https://api.cloudnumbering.com/v1.1/catalogue'
- Confirm that the response has
"success": trueand aresult.entriesarray.
What happens next
The examples in this Help Centre use API v1.1. Its routes start with https://api.cloudnumbering.com/v1.1/.
Use the API reference or v1.1 OpenAPI document for complete schemas.
Troubleshooting
The response is 401 Unauthorized
Check that the access token has not expired and that the header is Authorization: Bearer <token>.
The response is 404 Route not found
Check the method and the /v1.1/ path against the API reference.
Comments
0 comments
Please sign in to leave a comment.