- Determine Where Your App Is Deployed
- Register your application with AT&T Developer portal
- Obtain a client_id and client_secret for your app from AT&T Developer portal
- Request authorization code on the User's behalf from AT&T OAuth server
- AT&T OAuth Server redirects back to your app with OAuth code
- Use returned oauth code to request OAuth access token
- Use OAuth access token to call API
Your app will need to be given permission by each user in order to access their personal data. Here is how it works:
- The app will navigate to the “Consent Request” page automatically, whenever the app needs to obtain authorization to access user data
- User enters their wireless number, then click on "Allow" button
- An SMS will be sent to the user’s phone, with a PIN to allow the app access
- User enters the PIN from their phone into their web browser, then clicks on “OK” button
- User should see “Thank you” message then must click on the "Close Window" button (NOT "Sign up Now") to complete the authorization process
- Now the application is authorized to call APIs on the user's behalf
The Location API allows you to return the current location for a specific mobile device, based on the phone number. The user will need to give permission to the application that wants to track the mobile device, and the application will only be able to get the location data for the user’s own phone.
You need to pass in both the telephone number you want to obtain location data for, along with the requestedAccuracy parameter, which determines the precision of how the calculation to determine the phone's location is performed.
bundle install
FOUNDRY_CLIENT_ID=<your client ID here> FOUNDRY_CLIENT_SECRET=<your secret here> ruby helloapp.rb