Difference between revisions of "Att"
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Your request number is CUL714185794403 https://www.att.com/deviceunlock/request/#/status | |||
https://github.com/attdevlab/DevLabs | https://github.com/attdevlab/DevLabs | ||
===demo=== | |||
#each user needs to give permission and get an apikey | |||
http://localhost/?code=WnaBDEsEV9d1erjeYI6V | http://localhost/?code=WnaBDEsEV9d1erjeYI6V | ||
Line 6: | Line 11: | ||
Client Secret: eaega4cuwbntp3s03s6ycuh9nnfgenny | Client Secret: eaega4cuwbntp3s03s6ycuh9nnfgenny | ||
client_id= | curl https://api.att.com/oauth/token --request POST --insecure --data "client_id=sm2bbii1fi2tkefzbsgmx5enbcoaknys&client_secret=zdiwy0wzs | ||
dsbocojombcm3t5lujbxzax&grant_type=authorization_code&code=73hAU6Ic1Uxx2wLGrsdh" | |||
{ | { | ||
Line 16: | Line 22: | ||
===stuff2get=== | ===stuff2get imim +mim=== | ||
https://matrix.bf.sl.attcompute.com/apps/stuff2get-sandbox | |||
App Key: | App Key: | ||
sm2bbii1fi2tkefzbsgmx5enbcoaknys | |||
App Secret: | App Secret: | ||
zdiwy0wzsdsbocojombcm3t5lujbxzax | |||
access code from localhost: 73hAU6Ic1Uxx2wLGrsdh | |||
Merchant ID: e343f84e-2bf2-4d9e-b235-476c73badbd2 | Merchant ID: e343f84e-2bf2-4d9e-b235-476c73badbd2 | ||
Oauth via cURL | |||
Webserver Flow (grant_type = authorization_code) For the APIs that requires authorization (authorization code based OAuth model), copy and paste the following urI into Web browser and press enter to begin authorization. Update scope in the URI below to match the API that you would like to access. https://api.att.com/oauth/authorize? | |||
https://api.att.com/oauth/authorize?client_id=sm2bbii1fi2tkefzbsgmx5enbcoaknys&scope=IMMN,MIM&redirect_uri=http://localhost | |||
{ | |||
"access_token":"OsAERCr7Vg1FPaJMSdXkG4e6SDZJoroR", | |||
"token_type":"bearer", | |||
"expires_in":157680000, | |||
"refresh_token":"91I89e5HCgYT7Oi4ihV6TVMwjn8xe02G" | |||
} | |||
====send message==== | |||
<pre> | |||
curl --request POST --insecure --header "Authorization: Bearer OsAERCr7Vg1FPaJMSdXkG4e6SDZJoroR" --header "Accept: application/json" -H"Content-Type: application/xml" --data "<messageRequest><addresses>tel:8574982574</addresses><addresses>mckenna.tim@gmail.com</addresses><text>Hello world</text></messageRequest>" https://api.att.com/myMessages/v2/messages | |||
</pre> | |||
====get messages==== | |||
==sound api== | |||
curl https://api.att.com/oauth/token --request POST --insecure --data "client_id=vjsu8weosqfxmafnnqzp1qxjfnn14lsc&client_secret=9q9xqvux4 | |||
oejqe6fnm5dipzw8fypqb43&grant_type=client_credentials&scope=SPEECH,STTC,TTS" | |||
{ | { | ||
"access_token":"xm3Xukon3RUaYmiuewp3DPEzs78wCQHd", | |||
"token_type":"bearer", | "token_type":"bearer", | ||
"expires_in":157680000, | |||
"refresh_token":"7a5nIRW40kw0sdaVTw2OjXovKd0l6yxO" | |||
} | } | ||
curl --request POST --insecure --header "Authorization: Bearer xm3Xukon3RUaYmiuewp3DPEzs78wCQHd" --header "Accept: application/json" --header "Content-type: audio/wav" --header "X-SpeechContext: SMS" --data-binary @homeBy6.wav https://api.att.com/speech/v3/speechToText | |||
{"Recognition": {"Info": {"metrics": {"audioBytes": 467968, "audioTime": 5.30000019}}, "NBest": [{"Confidence": 0.930000007, "Grade": "accep | |||
t", "Hypothesis": "I will be home by six", "LanguageId": "en-US", "ResultText": "I will be home by six", "WordScores": [0.61, 1, 1, 1, 1, 0. | |||
97], "Words": ["I", "will", "be", "home", "by", "six"]}], "ResponseId": "84d96c94b2876598d99154d861509d3e", "Status": "OK"}} | |||
$ curl --request POST --insecure --header "Authorization: Bearer xm3Xukon3RUaYmiuewp3DPEzs78wCQHd" --header "Accept: application/json" --header "Content-type: multipart/x-srgs-audio" --form "x-grammar=@medications.grxml;type=application/srgs+xml" --form "x voice=@loratadine.wav;type=audio/wav" https://api.att.com/speech/v3/speechToTextCustom | |||
{"Recognition": {"Info": {"metrics": {"audioBytes": 103424, "audioTime": 1.16999996}}, "NBest": [{"Confidence": 0.63, "Grade": "accept", "Hy | |||
pothesis": "loratadine", "LanguageId": "en-US", "ResultText": "loratadine", "WordScores": [0.66], "Words": ["loratadine"]}], "ResponseId": " | |||
998710f1de77c2e4087c1a1470bcc416", "Status": "OK"}} |
Latest revision as of 18:31, 31 January 2017
Your request number is CUL714185794403 https://www.att.com/deviceunlock/request/#/status
https://github.com/attdevlab/DevLabs
demo
- each user needs to give permission and get an apikey
http://localhost/?code=WnaBDEsEV9d1erjeYI6V
Client Id: 7kwrdtgkob2msbsfymr4wods78uanf4o
Client Secret: eaega4cuwbntp3s03s6ycuh9nnfgenny
curl https://api.att.com/oauth/token --request POST --insecure --data "client_id=sm2bbii1fi2tkefzbsgmx5enbcoaknys&client_secret=zdiwy0wzs dsbocojombcm3t5lujbxzax&grant_type=authorization_code&code=73hAU6Ic1Uxx2wLGrsdh"
{
"access_token": "Rvrc68jcKGRKJXk0Azugf7o2LDZMDDTD", "token_type": "bearer", "expires_in": 157679999, "refresh_token": "fMzxpdScXERpxHqMTJvW3Y6SZiQNh734"
}
stuff2get imim +mim
https://matrix.bf.sl.attcompute.com/apps/stuff2get-sandbox
App Key:
sm2bbii1fi2tkefzbsgmx5enbcoaknys
App Secret: zdiwy0wzsdsbocojombcm3t5lujbxzax
access code from localhost: 73hAU6Ic1Uxx2wLGrsdh
Merchant ID: e343f84e-2bf2-4d9e-b235-476c73badbd2 Oauth via cURL Webserver Flow (grant_type = authorization_code) For the APIs that requires authorization (authorization code based OAuth model), copy and paste the following urI into Web browser and press enter to begin authorization. Update scope in the URI below to match the API that you would like to access. https://api.att.com/oauth/authorize?
{ "access_token":"OsAERCr7Vg1FPaJMSdXkG4e6SDZJoroR", "token_type":"bearer", "expires_in":157680000, "refresh_token":"91I89e5HCgYT7Oi4ihV6TVMwjn8xe02G" }
send message
curl --request POST --insecure --header "Authorization: Bearer OsAERCr7Vg1FPaJMSdXkG4e6SDZJoroR" --header "Accept: application/json" -H"Content-Type: application/xml" --data "<messageRequest><addresses>tel:8574982574</addresses><addresses>mckenna.tim@gmail.com</addresses><text>Hello world</text></messageRequest>" https://api.att.com/myMessages/v2/messages
get messages
sound api
curl https://api.att.com/oauth/token --request POST --insecure --data "client_id=vjsu8weosqfxmafnnqzp1qxjfnn14lsc&client_secret=9q9xqvux4 oejqe6fnm5dipzw8fypqb43&grant_type=client_credentials&scope=SPEECH,STTC,TTS"
{ "access_token":"xm3Xukon3RUaYmiuewp3DPEzs78wCQHd", "token_type":"bearer", "expires_in":157680000, "refresh_token":"7a5nIRW40kw0sdaVTw2OjXovKd0l6yxO" }
curl --request POST --insecure --header "Authorization: Bearer xm3Xukon3RUaYmiuewp3DPEzs78wCQHd" --header "Accept: application/json" --header "Content-type: audio/wav" --header "X-SpeechContext: SMS" --data-binary @homeBy6.wav https://api.att.com/speech/v3/speechToText
{"Recognition": {"Info": {"metrics": {"audioBytes": 467968, "audioTime": 5.30000019}}, "NBest": [{"Confidence": 0.930000007, "Grade": "accep t", "Hypothesis": "I will be home by six", "LanguageId": "en-US", "ResultText": "I will be home by six", "WordScores": [0.61, 1, 1, 1, 1, 0. 97], "Words": ["I", "will", "be", "home", "by", "six"]}], "ResponseId": "84d96c94b2876598d99154d861509d3e", "Status": "OK"}}
$ curl --request POST --insecure --header "Authorization: Bearer xm3Xukon3RUaYmiuewp3DPEzs78wCQHd" --header "Accept: application/json" --header "Content-type: multipart/x-srgs-audio" --form "x-grammar=@medications.grxml;type=application/srgs+xml" --form "x voice=@loratadine.wav;type=audio/wav" https://api.att.com/speech/v3/speechToTextCustom
{"Recognition": {"Info": {"metrics": {"audioBytes": 103424, "audioTime": 1.16999996}}, "NBest": [{"Confidence": 0.63, "Grade": "accept", "Hy pothesis": "loratadine", "LanguageId": "en-US", "ResultText": "loratadine", "WordScores": [0.66], "Words": ["loratadine"]}], "ResponseId": " 998710f1de77c2e4087c1a1470bcc416", "Status": "OK"}}