Skip to content

Instantly share code, notes, and snippets.

View PratibhaChintakunta's full-sized avatar

PratibhaChintakunta

View GitHub Profile
# * Authorization header value should be in the format of "Bearer xxx" where xxx is access token returned
# from a previous GET https://api.telstra.com/v1/oauth/token request.
UID="9999999999"
TOKEN="<access_token>"
curl -H "Authorization: Bearer $TOKEN" \
"https://api.telstra.com/v1/subscriber-profile/uids/$UID"
# * Authorization header value should be in the format of "Bearer xxx" where xxx is access token returned
# from a previous GET https://api.telstra.com/v1/oauth/token request.
MSISDN="61400000000"
TOKEN="<access_token>"
curl -H "Authorization: Bearer $TOKEN" \
"https://api.telstra.com/v1/subscriber-profile/msisdns/$MSISDN"
# Obtain these keys from the Telstra Developer Portal
CONSUMER_KEY="your consumer key"
CONSUMER_SECRET="your consumer secret"
curl -X POST \
-H "Accept: application/json" \
-d "client_id=$CONSUMER_KEY&client_secret=$CONSUMER_SECRET&grant_type=client_credentials&scope=SUBSCRIBERPROFILE" \
"https://api.telstra.com/v1/oauth/token"
{
"code": 4011,
"status": 400,
"message": "Invalid Msisdn, Please provide a valid Msisdn",
"errors": [{
"code": 4011,
"message": "Invalid Msisdn, Please provide a valid Msisdn"
}]
}
{
"code": 4001,
"status": 400,
"message": "Invalid Msisdn, Please provide a valid UID",
"errors": [{
"code": 4001,
"message": "Invalid UID, Please provide a valid UID"
}]
}
{
"status": 200,
"data": {
"msisdn": "61400000000",
"uid": "9999999999",
"imsi": "505000000000000",
"technology": "3G",
"spid": "0002",
"paymentType": "postpaid"
}