Create a project for your application (if you have not already done so) by clicking Create project.
Select APIS & AUTH > APIs from the side menu. The list of accessible Google services appears.
Scroll through the list until you find Google Analytics, click the Status switch next to the service name (so that it switches from OFF to ON). NOTE: google autmoatically will have other services turned on you can switch those off as long as you keep Google Analytics on.
For some services, the Console will display a Terms of Service pane. To go ahead, check the I agree to these terms box, then click Accept.
Scroll back to the top of the page and APIS & AUTH > Credentials in the side menu.
The API Access pane appears.
Click Create an OAuth 2.0 Client ID.
The Create Client ID dialog appears.
Click the Installed Application radio button and Other. It should look like below:
Click Create.
The credentials under Client ID for native application can be used when prompted by ga --configure