Difference between revisions of "Att"

From Wiki2
Line 1: Line 1:
https://github.com/attdevlab/DevLabs
https://github.com/attdevlab/DevLabs
 
===demo===
#each user needs to give permission and get an apikey
#each user needs to give permission and get an apikey


Line 20: Line 20:




===stuff2get===
===stuff2get imim +mim===
 
https://matrix.bf.sl.attcompute.com/apps/stuff2get-sandbox
http://localhost/?code=61jKIb8ZJDe0oiT1JFhR
 
App Key:
2e1dsvd4fl6kgpwfbarebfxuvyppayhh
App Secret:
tveoq3xbqaesdl1tjddeboogkdeuwpbk
Merchant ID: e343f84e-2bf2-4d9e-b235-476c73badbd2
 
$ curl https://api.att.com/oauth/token --request POST --insecure --data "client_id=2e
1dsvd4fl6kgpwfbarebfxuvyppayhh&client_secret=tveoq3xbqaesdl1tjddeboogkdeuwpbk&grant_t
ype=authorization_code&code=61jKIb8ZJDe0oiT1JFhR"
 
{
  "access_token":"I9OJOl4g6nzmv2m0RggG7P15klOTvHpe",
  "token_type":"bearer",
  "expires_in":157679999,
  "refresh_token":"3kwd1zWsescSmZ7QYklO94tTXw8eHKb8"
}
====send a message====
---- Messaging Lab 4 -----


<pre>
<pre>

Revision as of 12:55, 20 May 2014

https://github.com/attdevlab/DevLabs

demo

  1. 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

curl --request POST --insecure --header "Authorization: Bearer I9OJOl4g6nzmv2m0RggG7P15klOTvHpe" --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

App Key: sm2bbii1fi2tkefzbsgmx5enbcoaknys

App Secret: zdiwy0wzsdsbocojombcm3t5lujbxzax

apikey: 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?

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"
 }