3. Get User Tokens
POST {{host}}/oauth/token
Request an access token for the newly created user. A refresh token is also provided as part of the response, which can be used generate a new access token if it has expired.
This is a long lived access token that should be stored securely and reused for creating user profile related resources. It does, however, have a limited scope, so you won't be able to use this access token for creating transfers before the customer finalizes their account setup and authorizes the partner's access to it.
Use this token for every subsequent API call in Steps 2-3
Request Body
[{"name"=>"grant_type", "value"=>"registration_code", "datatype"=>"string"}, {"name"=>"client_id", "value"=>"{{client-id}}", "datatype"=>"string"}, {"name"=>"email", "value"=>"new-user@email.com", "datatype"=>"string"}, {"name"=>"registration_code", "value"=>"<UUID for user>", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"access_token":"{access_token}","token_type":"bearer","refresh_token":"{refresh_token}","expires_in":43199,"scope":"transfers"}