def obtain_token(body, opts = {})
      data, _status_code, _headers = obtain_token_with_http_info(body, opts)
      return data
    end
def obtain_token(body, opts = {})
      data, _status_code, _headers = obtain_token_with_http_info(body, opts)
      return data
    end
ObtainToken
 Returns an OAuth access token.   The endpoint supports distinct methods of obtaining OAuth access tokens.  Applications specify a method by adding the `grant_type` parameter  in the request and also provide relevant information.  For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management).   __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and  a refresh token in the response.   By default, the OAuth API lets up to 500 Square accounts authorize your application. Please [contact support](https://squareup.com/help/us/en/contact?prefill=developer_api) if you are developing an application for a larger audience.  __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__.
 @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
 @param [Hash] opts the optional parameters
 @return [ObtainTokenResponse]