Authenticate

POST https://api.paytomorrow.com/api/uaa/oauth/token

Request for authenticating an API user.

Use your assigned client_id and client_secret in base64 in the Authorization header.

You can find this information in your Resources section on PayTomorrow as API Signature, which is the client_id and client_secret already in base64.

For example:

Authorization: Basic YmxhYmxhYmxhOmJsYWJsYWJsYQ==

Returns a json with the token and the refresh_token.

{
"access_token": The access token,
"token_type": "bearer",
"refresh_token": The refresh token,
"expires_in": Expire time,
"scope": "openid"
}

Please note, scope should always be openid.

Headers

Accept: application/json
Content-Type: application/x-www-form-urlencoded
Authorization: Basic cGF5dG9tb3Jyb3c6N2IzNDlmZWM3Yw==

Request Body

grant_type=password&scope=openid&username=enter_you_username%0A&password=enter_your_password_here

Response Example

{
"access_token": "b29afa81-ab6d-4467-be18-6f781061aad4",
"token_type": "bearer",
"refresh_token": "b7353ed2-dd57-42d2-b3c8-d22c15e5dbd0",
"expires_in": 43038,
"scope": "openid"
}